Networking Forums

Networking Forums > Computer Networking > Linux Networking > IPv4 unicast sendto() through a network interface

Reply
Thread Tools Display Modes

IPv4 unicast sendto() through a network interface

 
 
Vinod Kumar P
Guest
Posts: n/a

 
      10-29-2003, 11:15 AM
Dear all

How can I send a unicast packet through a particular network interface
of my machine using UDP sendto() function in C? How can I send
multicast sendto() through a network interface other than by
specifying an IP like in setsockopt-MULTICST_IF( b specifying the
interface index/name). I am working on IPv4 sockets.

Thanks for all expert advices

Vinod Kumar P
 
Reply With Quote
 
 
 
 
Phil Frisbie, Jr.
Guest
Posts: n/a

 
      10-29-2003, 04:06 PM
Vinod Kumar P wrote:

> Dear all
>
> How can I send a unicast packet through a particular network interface
> of my machine using UDP sendto() function in C?


Bind to a specific IP address instead of INADDR_ANY.

> How can I send
> multicast sendto() through a network interface other than by
> specifying an IP like in setsockopt-MULTICST_IF( b specifying the
> interface index/name). I am working on IPv4 sockets.


You cannot do it any other way.

> Thanks for all expert advices
>
> Vinod Kumar P


--
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com

 
Reply With Quote
 
Vinod Kumar P
Guest
Posts: n/a

 
      10-30-2003, 02:00 PM
"Phil Frisbie, Jr." <(E-Mail Removed)> wrote in message news:<YrSnb.1308$(E-Mail Removed)>...
> Vinod Kumar P wrote:
>
> > Dear all
> >
> > How can I send a unicast packet through a particular network interface
> > of my machine using UDP sendto() function in C?

>
> Bind to a specific IP address instead of INADDR_ANY.


I tried this. But the result is negative. The packet channels through
both network interfaces. I am working on RedHat Linux Version 7.2 with
packages gcc version 2.96, glibc2.2.4-13 and glibc-devel-2.2.4-13. do
you have any idea why this happens?

>
> > How can I send
> > multicast sendto() through a network interface other than by
> > specifying an IP like in setsockopt-MULTICST_IF( b specifying the
> > interface index/name). I am working on IPv4 sockets.

>
> You cannot do it any other way.
>
> > Thanks for all expert advices
> >
> > Vinod Kumar P

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NLB unicast network options John Windows Networking 3 09-26-2007 06:58 PM
Using IPv4 TCPMSS target with IPv6-in-IPv4 Mark T.B. Carroll Linux Networking 1 03-18-2007 10:30 AM
Find IPv4 address(es) for an interface Spoon Linux Networking 4 06-07-2006 01:04 AM
IPV4 recvfrom() thru which network interface Vinod Windows Networking 0 10-28-2003 08:59 PM
Re: IPV4 recvfrom() thru which network interface Paul Chitescu Windows Networking 0 10-28-2003 11:06 AM



1 2 3 4 5 6 7 8 9 10 11