Are you trying to use setsockopt with an IP address configured in VPP?

VPP and the kernel are independent, isolated, network stacks. Sockopts are a 
purely kernel-network-stack concept and have no effect on anything VPP does.

Even if you were trying to interact with an IP address in the kernel network 
stack, we discourage the use of syscalls as much as possible since they are 
quite expensive.

If you are trying to create the equivalent of a socket in VPP, you need to 
register a node for the traffic. For UDP this means hooking in to traffic that 
matches the destination UDP port. For IPIP that would mean registering a node 
that hooks into the IP protocol number for IPIP.

Cheers,
Chris.

From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Deepak Jain4
Sent: Thursday, January 12, 2017 6:37 AM
To: vpp-dev@lists.fd.io
Cc: deepanshu.saxe...@tcs.com
Subject: Re: [vpp-dev] Error while binding the socket with vpp interface.

Hi Vpp Developers,

Following are the few observation about the issue

1. setsockopt() APi is returning error 'eaddrnotavail' .
2. If we don't assign the ip address to interface then  we are not getting 
above error.But in this
    case it is not considering this interface for igmp functionality.

Please provide any input on this.

Regards,
Deepak

-----Deepak Jain4/DEL/TCS wrote: -----
To: "vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>" 
<vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>>
From: Deepak Jain4/DEL/TCS
Date: 01/11/2017 04:16PM
Cc: Deepankar Gupta/DEL/TCS@TCS, 
deepanshu.saxe...@tcsexch.com<mailto:deepanshu.saxe...@tcsexch.com>
Subject: Error while binding the socket with vpp interface.

Hello Members,

I am getting error while  Binding the  socket to vpp interface.
it gets bind perfectly  with Linux interface ,but when i pass the vpp interface 
 it gives the error.


We also tried to debug the issue with the code given at 
/vnet/map/examples/health_check.c.
But still it giving the same problem.


 I am creating socket following socket() API

   if ((sd = socket (AF_INET, SOCK_RAW, IPPROTO_IPIP)) < 0) {
     perror ("Failed to get socket descriptor ");
     exit (EXIT_FAILURE);
   }



i am binding the socket with following setsockopt() Api.
 if (setsockopt (sd, SOL_SOCKET, SO_BINDTODEVICE, (void *) &ifr, sizeof (ifr)) 
< 0) {
     perror ("SO_BINDTODEVICE failed");
     exit (EXIT_FAILURE);
   }

Can anyone help me on this


Regards,
Deepak

=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to