Opendaylight: How to add a NORMAL action in Openflow? - openflow

I'm new to opendaylight and Openflow and have a few questions.
I'm using Open vSwitch as the vSwitch.
Normally, in the Open vSwitch , the default flow action is NORMAL, which forwards all packets to their destination.
As soon as I connect my vSwitch to Opendaylight, the default action is now CONTROLLER but Opendaylight does drop packets that not know the destination
How can I add the default NORMAL action in Opendaylight for any switch that I connect to it? I would like not to drop any packet.

are you installing the l2switch features? I think that might be what is
installing the flow to punt traffic to the controller.
try installing just openflowplugin-flow-services-rest. I think after that
you probably wont have any flows forced on your OVS. At that point you
can manually add any flows you want, via REST api.
This link might be helpful for doing that.

Related

Solution for IPC when firewall is activated and no rules can by added

For my application, I decided to implement the "Jump List" (added with W7 - Windows7CodePack).
The problem with JumpList, you cannot (or I ignore how to code) make an action on your active application. Link in menu open a new instance of application and this communicate informations with the first instance (play music, pass to next video, ...)
I tested Socket and WCF but I blocked by firewall and parts of code on the web I find is insufficient to implement correction or for test a another solution in my app.
I want only execute an action on my active application when a click on a task, in the jumplist.
Anybody have a idea ?

USB Mobile Broadband Modem on Windows 10 IoT?

Anyone had experience using a USB Mobile Broadband on Windows IoT with the Raspberry Pi2 already?
I have a Huawei datacard in the Windows IoT and appears as HUAWEI Mobile on connected devices but I'm unable to see the device on the wifimanager.htm admin page.
Don't even appear on the Device Manager list. Is this lack of drivers?
I was looking for a solution too, and I have finally found one. I hope the following will help you!
For the record, I used a Vodafone (Huawei) K5150, "officially" supported and Microsoft verified, according to the hardware compatibility list: https://developer.microsoft.com/en-us/windows/iot/win10/supportedinterfaces. The device was recognized and visible on the portal through an hdmi screen. Anyway, the raspberry couldn't get internet access.
Here is what I did to make it work:
install the key on a common laptop and check the internet access. Windows should see it as a cellular connection by the way.
find the xml file generated by Windows and located under C:\ProgramData\Microsoft\WwanSvc\Profiles. This file is called a profile and is used by Windows to characterize every wireless connection it sees. You can of course create yourself this file from scratch, but it's far more complicated/boring. You can also normally do that with the netsh command and the import or dump sub-command, but it doesn't work for broadband devices.
connect your raspberry to your local network and go to \\[name or IP address]\c$. In my case, it was \\minwinpc\c$. There, find a suitable place to copy the xml file, as well as the bmp file next to it, and don't forget to modify its content to point the right path for the icon (the bmp file).
the next step is super tricky, but highly important: you have to find the subscriber ID for your key. The one saved in the xml file is actually a kind of hash and if you don't set the correct value you'll have an error like
Add Profile Failure: Invalid Profile XML.
connect the key to your raspberry and enter a PSSession with PowerShell (details here: https://developer.microsoft.com/en-us/windows/iot/win10/samples/powershell). Then, use this command: netsh mbn show readyinfo interface="Cellular". The correct interface (in my case it's "Cellular") can be retrieved with the command netsh mbn show interfaces (mbn standing for Mobile Broadband I suppose). The subscriber ID, with other useful information, is displayed and you can copy it the to the xml file on your raspberry.
what's left is the actual profile activation, in two parts: add the newly imported profile and tell the raspberry to connect to it. For that, use the commands netsh mbn add profile interface="Cellular" name="profile.xml" and netsh mbn connect interface="Cellular" connmode=name name=ProfileName.
You mobile broadband key should now be activated and the raspberry should automatically connect to it at start.
Here are the few links that helped me a lot:
export the profile: https://www.experts-exchange.com/questions/28324340/Adding-custom-mobile-broadband-profiles-in-Win-7.html
replace the subscriber ID: https://social.technet.microsoft.com/Forums/office/en-US/7c2d6c77-1974-432b-a439-6e58f9306234/receive-add-profile-failure-invalid-profile-xml-error-when-adding-wwan-profile-windows-7?forum=w7itpronetworking
connect to the raspberry to copy the files: https://developer.microsoft.com/en-us/windows/iot/win10/samples/smb

IBM Worklight 6.2. Change default behavior for Remote disable in native apps

I'm using worklight application management features from an Android native App.
I want that when in the console the application status is changed to "Access Disabled" the only option for the user will be to quit.
In the Knowledge Center and in Developer works there is documentation about how to do it:
http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.appadmin.doc/admin/t_denying_access_to_older_app_versions.html?lang=en
https://www.ibm.com/developerworks/community/blogs/worklight/entry/how_to_create_a_customized_remote_disable_behavior?lang=en
It is explained that you must set a specific value for the initOptions object used in the WL.Client.init() method.
But in the Android native API I have not found the way to set the initOptions. The init method is deprecated and it does not accept initOptions.
Also, in case of Remote Disable the ResponseListener used in the WLClient.connect(aResponseListener) is not invoked, success or failure, no method is executed. Is this working as designed? I would expect a failure or success but not nothing.
Is it possible in a native app to force the application to close in case of Remote Disable?
How could I handle this situation manually in the app?
Unfortunately I do not have an example for you, but this is the general idea.
See if you can work with it (if someone can produce an example - please do...):
You need to create your own Remote Disable challenge handler that will extend the default Worklight Remote Disable challenge handler (RemoteDisableChallengeHandler.java).
class MyRemoteDisableChallengeHandler extends WLRemoteDisableChallengeHandler
Then you need to implement your custom logic in MyRemoteDisableChallengeHandler
WLClient.registerChallengeHander(new MyRemoteDisableChallengeHandler())
This will override the original.
You'll need to create your own dialog with a Quit button.
Some additional documentation.
For handling MaM configurations, this is, when you configure the app as Lost, Stolen, etc, in the Worklight Console -> Devices tab you must install the Fix IF201408281937 (Worklight 6.2) or later.
This events are also handled with the ChallengeHandler registered for the realm "wl_remoteDisableRealm"

GPRS and GPS on embedded Linux

I've got an embedded linux and a Telit gprs/gps module ("GM862-GPS" on USB-Port). My current project requires it to be connected via gprs for sending data, while continuously asking the module for the gps position. I'm connected to gprs with a ppp-daemon and chatsripts, but when the connection is established, the module seems to be locked (no reaction on AT-commands through minicom).
I read, that 'AT+CMUX' could be one solution, which is provided by this device, but I don't know how to use it, since the 'CMUX User Guide' by Telit isn't really helpfull (and a program for automatic setup is only provided for windows).
Does anyone know, how to deal with this command, or even knows a better choice to handle this problem ?
My answer might be too late.
You need to use CMUX to create another COM port to talk to it. I played with CMUX once and I understand your frustrations. In my case, it worked for a while and then failed and I couldn't find out why. You might want to post your question at Roundsolutions.
I programmed the module by writing Python scripts and upload to the module. Their Python API provides two channels to send AT commands to the module: MDM and MDM2. I use MDM as the AT command and use MDM2 to create sockets. Initially, you use MDM2 to send AT commands to create a socket connection. Once connected, whatever data sent to it will be interpreted as data stream instead of AT commands. They allow you to send '+++' to switch back to AT command mode.

How to disable/disconnect ethernet adapter in mac os x programmatically?

I am new to mac os x programming and just got an assignment to write small utility that disable either wireless or wired adapter based on configuration. I was able to disconnect wireless using corewlan framework like :
CWInterface interface = [CWInterface interfaceWithName:#"en1"];
BOOL result = [interface setPower:NO error:&err];
and it is working as expected. I need similar code to disable/disconnect ethernet adapter. I researched that ifconfig (as mentioned below can be used):
sudo ifconfig en0 down
but it require admin password and that i don't want to do. Please suggest an alternative programatic way to disable ethernet adapter without root password.
I read that SCNetworkConfiguration can be used but don't know how to use it. Please help.
Thanks
You cannot shut off network interfaces without having admin access (i.e. that's why the padlock is there in the Network Preference Pane). Think of it this way... you would not want non-admin users on any public machine being able to turn off the network arbitrarily.
For my own apps where I also disable Ethernet & WiFi, I have to get privileges to launch a separate tool in order to run stuff from the SystemConfiguration framework as admin.