[Ada] Add IP_PKTINFO to GNAT.Sockets.Constants (PR ada/33688)

Arnaud Charlet charlet@adacore.com
Wed Dec 19 16:46:00 GMT 2007


This change adds constant IP_PKTINFO to GNAT.Sockets.Constants to support
obtaining additional, ancillary information about received IP datagrams on
systems that support this option.

Further changes are expected from Sam Tardieu on this PR, as per a
previous discussion between Thomas and Sam off-list.

2007-12-19  Thomas Quinot  <quinot@adacore.com>

	Part of PR ada/33688
	* gen-soccon.c: Add constant IP_PKTINFO to allow getting ancillary
	datagram info on Linux.

-------------- next part --------------
Index: gen-soccon.c
===================================================================
--- gen-soccon.c	(revision 131064)
+++ gen-soccon.c	(working copy)
@@ -573,6 +573,11 @@ CND(IP_ADD_MEMBERSHIP, "Join a multicast
 #endif
 CND(IP_DROP_MEMBERSHIP, "Leave a multicast group")
 
+#ifndef IP_PKTINFO
+#define IP_PKTINFO -1
+#endif
+CND(IP_PKTINFO, "Get datagram info")
+
 _NL
 TXT("   -------------------")
 TXT("   -- System limits --")


More information about the Gcc-patches mailing list