Get/Set IP/UDP options from/to UDP datagram socket.

Rohan Sen senrohan at gmail.com
Wed May 30 16:07:52 UTC 2007


Hi Everybody,

I had a code in Linux using datagram sockets to run over UDP and get/set
some ancillary options as well. Following are those options.

The socket has been opened using the following call.

sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);

1> To send UDP datagram with UDP-Checksum

2> To send UDP datagram without UDP-Checksum

3> To accept UDP datagram with UDP-Checksum

4> To accept UDP datagram without UDP-Checksum



5> Join the socket to the supplied multicast group on the specified
interface.

6> Get IP TTL from a received udp datagram.

7> Set IP TTL to a sent udp dataram.

8> Get IP TOS from a received udp datagram.

9> Set IP TOS to a sent udp datagram.

10> Get IP Option from a received udp datagram.

11> Set IP Option to a sent udp datagram.

12> Get all ICMP error message received from IP layer

13> Get source and destination IP address from the received UDP datagram.
These options do not seem to be compatible with FreeBSD implementation of
sockets.

Could you please let me know any reference, book or any material which I can
refer to for getting information about how to perform these tasks in
FreeBSD 6.2?

-- 
thanks and regards,
Rohan Sen


More information about the freebsd-net mailing list