Re: getsockname(.....) not working
Re: getsockname(.....) not working
- Subject: Re: getsockname(.....) not working
- From: Matt Jaffa <email@hidden>
- Date: Fri, 21 Nov 2003 21:06:22 -0700
Ok,
I have looked at socket.h and i think I saw sys_socket.h,
But I still don't know what I am looking for to be able to decipher
the socket identifier,
So a little more help would be great.
Thanks
On Nov 21, 2003, at 4:56 PM, Justin Walker wrote:
On Friday, November 21, 2003, at 03:26 PM, Matt Jaffa wrote:
Hi,
I am developing a kernel Extension and right
now I have the
socket.h file included in my KEXT
but it wont let me use getsockname function found in socket.h
any reasons for this? It says it can't find the identifier.
What is the 'it' that says it can't find the identifier? It's easier
to help if know what actually went wrong, and what the error messages
are.
The identifier 'getsockname' is currently exported by the kernel (but,
as discussed on this list earlier, you can't bank on that being true
for long).
in that call it gives you the integer socket identifier and I am
trying to get
who sent the sendto command and also what protocol and any ports it
wants to use, etc.
This call won't give you that information. All the call gets you is
the local address of the socket.
You need the 'socket' structure, which you get from the file
descriptor (see bsd/kern/sys_socket.h to see how to do this).
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | Some people have a mental
| horizon of radius zero, and
| call it their point of view.
| -- David Hilbert
*--------------------------------------
*-------------------------------*
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.