Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NKE - Socket filter - get local address problem.



Title: NKE - Socket filter - get local address problem.

Hi,

10.4.9

NKE - Socket filter - get local address problem.

I am in need of redirecting tcp requests to an alternative host, based on source ip:port and destination ip:port

I am able to redirect the destination in the socket filter call back
tl_connect_out_fn,              /* sf_connect_out_func */
by manipulating the <Socket_t to> param successfully.


HOWEVER - I am unable to obtain the local address at this point.

I have used
 err = sock_getsockname(so, (struct sockaddr *) &local, (int)&len);
but I keep getting <0.0.0.0> as a result.

optionally is there another call back where I can examine both addresses and change the <to> prior to bind?

Thanks, Erez

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.