Re: NKE socket communication and soreserve
Re: NKE socket communication and soreserve
- Subject: Re: NKE socket communication and soreserve
- From: Joshua Graessley <email@hidden>
- Date: Wed, 9 Apr 2003 09:25:11 -0700
soreserve is used to set the maximum amount of data the socket will
store in the socket buffer. Sockets have two buffers, a send buffer and
a receive buffer. There is a socket option that can be used to set the
size of the buffers. When this socket option is called, the soreserve
function is called.
The soreserve call in the kernel looks like this:
int soreserve(struct socket *so, u_long sndcc, u_long rcvcc);
The socket filter looks like this:
int (*sf_soreserve)(struct socket *, u_long, u_long, struct kextcb *);
The first u_long is the new send buffer size and the second u_long is
the new receive buffer size. The socket buffers don't actually allocate
that memory, they just record the limit and won't store anything over
that limit.
-josh
On Wednesday, Apr 9, 2003, at 07:28 US/Pacific, Stiphane Sudre wrote:
Does someone know what the purpose of soreserve is when it is used in
the TCPLogger NKE communication sample code?
And what is the meaning of the value used in it (the last 2)?
There seems to be a bug in the NKE Documentation as the documentation
is stating that the soreserve prototype is:
soreserve(struct socket *, struct sockbut *); (yes, there's a typo too
in the doc)
when in the real world, it's not the case.
The url of the buggy doc being:
developer.apple.com/techpubs/macosx/Darwin/
IOKit/DeviceDrivers/Network/NKE.pdf
Strangely enough, there's no man page for soreserve.
_______________________________________________
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.