• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: SO_BINDTODEVICE or sendto using specific network interface
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SO_BINDTODEVICE or sendto using specific network interface


  • Subject: Re: SO_BINDTODEVICE or sendto using specific network interface
  • From: Josh Graessley <email@hidden>
  • Date: Thu, 15 Dec 2005 11:52:51 -0800


The MoreAuthSample from Apple's website covers how to do this. It is well documented and works around a number of potentially nasty issues.


<http://developer.apple.com/samplecode/MoreAuthSample/ MoreAuthSample.html>

For a sample that uses MoreAuth, you can grab the BSDLLCTest. You will be using MoreAuth to get a bpf file descriptor instead of a PF_NDRV socket file descriptor, but it's pretty much the same thing.

<http://developer.apple.com/samplecode/BSDLLCTest/BSDLLCTest.html>

-josh

On Dec 14, 2005, at 8:13 PM, Alex Telitsine wrote:

Peter,

I was able to send UDP independently on each interface via BPF.
Right now I have to specify each router MAC address, so IP/Ethernet packets are properly created end delivered. There are 2 main problems left to solve: automatically obtain MAC address for the routers ( should be possible with ARP) and gain "root" privilege for PFB access in .APP/GUI mode.


I would like multi-path to be integrated into the packge. But it is possible we'll need to use 3rd party plugin, if there is problem with "root" access right for BPF mode.

@


On Dec 13, 2005, at 7:52 AM, Peter Sichel wrote:


On 12/12/05, Alex Telitsine wrote:


Each interface is connected to its own Sat modem. I had typo in second
router's IP, it is different from first router. Only one way (UDP)
connection is required, from SRC1/2 to DST.


SRC#1 192.168.0.20--->Modem/Router#1-192.168.0.12------- +----------------

  DST 192.168.2.2

SRC#2 192.168.1.20--->Modem/Router#2-192.168.1.12-------+


That's interesting. My own firewall product includes a "Route to"
filter action that allows you to forward packets out a different network
port based on any packet attribute.


If you are willing to send the packet twice using the "IP Header
Include" option to specify a different source IP address for each
satellite modem, you could then define a filter rule to match the
corresponding source IP address and route the packet out the
corresponding port.

Here's how the "Route to" filter action works:

First, you specify "Route to" and the target IP address. The software
uses ARP to find the corresponding hardware address. It also compares
the target IP address against each local network interface to see which
IP subnet it belongs to and assigns the corresponding data link. If it
matches a local IP address exactly, the direction is set to inbound
otherwise outbound. Finally, when a matching packet is detected by an
interface filter NKE, it rewrites the destination hardware address and
re-injects the packet to the previously determined data link and direction.


It sounds like this might do what you want and you can try it free for
21-days. Is a licensed 3rd party product acceptable, or are you looking
to develop your own in house code to this?


Kind Regards,

- Peter Sichel
  Sustainable Softworks
  www.sustworks.com






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com


This email sent to email@hidden


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: SO_BINDTODEVICE or sendto using specific network interface
      • From: "Duane Murphy" <email@hidden>
References: 
 >SO_BINDTODEVICE or sendto using specific network interface (From: Alex Telitsine <email@hidden>)
 >Re: SO_BINDTODEVICE or sendto using specific network interface (From: Josh Graessley <email@hidden>)
 >Re: SO_BINDTODEVICE or sendto using specific network interface (From: Alex Telitsine <email@hidden>)
 >Re: SO_BINDTODEVICE or sendto using specific network interface (From: "Peter Sichel" <email@hidden>)
 >Re: SO_BINDTODEVICE or sendto using specific network interface (From: Alex Telitsine <email@hidden>)
 >Re: SO_BINDTODEVICE or sendto using specific network interface (From: "Justin C. Walker" <email@hidden>)
 >Re: SO_BINDTODEVICE or sendto using specific network interface (From: Alex Telitsine <email@hidden>)
 >Re: SO_BINDTODEVICE or sendto using specific network interface (From: "Peter Sichel" <email@hidden>)
 >Re: SO_BINDTODEVICE or sendto using specific network interface (From: Alex Telitsine <email@hidden>)

  • Prev by Date: Re: URLAccess Stalls
  • Next by Date: Re: SO_BINDTODEVICE or sendto using specific network interface
  • Previous by thread: Re: SO_BINDTODEVICE or sendto using specific network interface
  • Next by thread: Re: SO_BINDTODEVICE or sendto using specific network interface
  • Index(es):
    • Date
    • Thread