Hi

I have been trying to use setsockopt with option SO_BINDTODEVICE and option
value lo. The code is similar to this

    printf("\nDevice name is %s\n",argv[3] );
    retval=setsockopt(hSocket, SOL_SOCKET, SO_BINDTODEVICE, argv[3],
(strlen(argv[3])+1) );

    if(retval<0)
    {
         printf("\nSetting socket options failed %d\n", retval);
             return 0;
    }

The setsockopt API is always returning -1.  I am not able to understand the
problem. I tried running the same program on my ubuntu PC and it works fine
and the device is getting binded to the socket.

If anybody has faced the same problem please help

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to