I want to know if SO_REUSEPORT option is enabled in LINUX 2.6 or not ??
If I try to use it and compile my code I get following error
01.c:72: error: `SO_REUSEPORT' undeclared (first use in this function)
01.c:72: error: (Each undeclared identifier is reported only once
01.c:72: error: for each function it appears in.)
Using the above option I guess I can bind two different sockets to same IPADRESS and PORT NUMBER
SO_REUSEPORT is what most people would expect SO_REUSEADDR to be. Basically, SO_REUSEPORT allows you to bind an arbitrary number of sockets to exactly the same source address and port as long as all prior bound sockets also had SO_REUSEPORT set before they were bound.
In addition to binding a socket to a local address or connecting it to a destination address, application programs need a method to control the socket. For example, when using protocols that use time out and retransmission, the application program may want to obtain or set the time-out parameters.
SO_PRIORITY Set the protocol-defined priority for all packets to be sent on this socket. Linux uses this value to order the networking queues: packets with a higher priority may be processed first depending on the selected device queueing discipline.
The linger structure maintains information about a specific socket that specifies how that socket should behave when data is queued to be sent and the closesocket function is called on the socket.
this options was done in kernel 3.9, see this git commit
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c617f398edd4db2b8567a28e899a88f8f574798d
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With