[cgl_discussion] IPv6 Advanced Sockets API

Rod Van Meter Rod.VanMeter at nokia.com
Wed Feb 5 16:40:57 PST 2003


I said I would look into the state of RFC2292, Advanced Sockets API for
IPv6.  Here's the first round of results.

A lot of this is misleading at this point; many of these things don't
require kernel support, they are purely library functions (or struct
definitions) to allow userland programs to manipulate raw packets when
they get them.  I should probably add "U" into the possible results for
"Unneeded", for things that are strictly library or kernel functions,
but I haven't completely figured out which are which yet.

I'm certain there will be errors in this as we go into more detail, as I
discover that I've misinterpreted something or not followed a full chain
of includes.

		--Rod


In the list below, column "U" is USAGI 2002/11/06, and "5" is 2.5.57. 
"L" is the GNU C Library (whatever version ships with Red Hat 8.0).  "B"
is FreeBSD 4.2, for comparison (I haven't gotten around to doing that
yet).  Asterisks and question marks are things that need to be
double-checked.
  
   The following list summarizes the constants and structure,
   definitions discussed in this memo, sorted by header.

U 5 L B
N N Y	<netinet/icmp6.h> ICMP6_DST_UNREACH
N N Y	<netinet/icmp6.h> ICMP6_DST_UNREACH_ADDR
N N Y	<netinet/icmp6.h> ICMP6_DST_UNREACH_ADMIN
N N Y	<netinet/icmp6.h> ICMP6_DST_UNREACH_NOPORT
N N Y	<netinet/icmp6.h> ICMP6_DST_UNREACH_NOROUTE
N N Y	<netinet/icmp6.h> ICMP6_DST_UNREACH_NOTNEIGHBOR
Y Y Y	<netinet/icmp6.h> ICMP6_ECHO_REPLY
Y Y Y	<netinet/icmp6.h> ICMP6_ECHO_REQUEST
Y?Y?Y	<netinet/icmp6.h> ICMP6_INFOMSG_MASK
N?N?Y	<netinet/icmp6.h> ICMP6_MEMBERSHIP_QUERY
N?N?Y	<netinet/icmp6.h> ICMP6_MEMBERSHIP_REDUCTION
N?N?Y	<netinet/icmp6.h> ICMP6_MEMBERSHIP_REPORT
N N Y	<netinet/icmp6.h> ICMP6_PACKET_TOO_BIG
N N Y	<netinet/icmp6.h> ICMP6_PARAMPROB_HEADER
N N Y	<netinet/icmp6.h> ICMP6_PARAMPROB_NEXTHEADER
N N Y	<netinet/icmp6.h> ICMP6_PARAMPROB_OPTION
N N Y	<netinet/icmp6.h> ICMP6_PARAM_PROB
N N Y	<netinet/icmp6.h> ICMP6_TIME_EXCEEDED
N N Y	<netinet/icmp6.h> ICMP6_TIME_EXCEED_REASSEMBLY
N N Y	<netinet/icmp6.h> ICMP6_TIME_EXCEED_TRANSIT
N N Y	<netinet/icmp6.h> ND_NA_FLAG_OVERRIDE
N N Y	<netinet/icmp6.h> ND_NA_FLAG_ROUTER
N N Y	<netinet/icmp6.h> ND_NA_FLAG_SOLICITED
N N Y	<netinet/icmp6.h> ND_NEIGHBOR_ADVERT
N N Y	<netinet/icmp6.h> ND_NEIGHBOR_SOLICIT
Y Y Y	<netinet/icmp6.h> ND_OPT_MTU
N N Y	<netinet/icmp6.h> ND_OPT_PI_FLAG_AUTO
N N Y	<netinet/icmp6.h> ND_OPT_PI_FLAG_ONLINK
Y Y Y	<netinet/icmp6.h> ND_OPT_PREFIX_INFORMATION
* * Y	<netinet/icmp6.h> ND_OPT_REDIRECTED_HEADER
N N Y	<netinet/icmp6.h> ND_OPT_SOURCE_LINKADDR
N N Y	<netinet/icmp6.h> ND_OPT_TARGET_LINKADDR
Y Y Y	<netinet/icmp6.h> ND_RA_FLAG_MANAGED
Y Y Y	<netinet/icmp6.h> ND_RA_FLAG_OTHER
N N Y	<netinet/icmp6.h> ND_REDIRECT
N N Y	<netinet/icmp6.h> ND_ROUTER_ADVERT
N N Y	<netinet/icmp6.h> ND_ROUTER_SOLICIT

N N Y	<netinet/icmp6.h> struct icmp6_filter{};
N N Y	<netinet/icmp6.h> struct icmp6_hdr{};
N N Y	<netinet/icmp6.h> struct nd_neighbor_advert{};
N N Y	<netinet/icmp6.h> struct nd_neighbor_solicit{};
Y?Y?Y	<netinet/icmp6.h> struct nd_opt_hdr{};
N N Y	<netinet/icmp6.h> struct nd_opt_mtu{};
N N Y	<netinet/icmp6.h> struct nd_opt_prefix_info{};
N N Y	<netinet/icmp6.h> struct nd_opt_rd_hdr{};
N?N?Y	<netinet/icmp6.h> struct nd_redirect{};
N N Y	<netinet/icmp6.h> struct nd_router_advert{};
N N Y	<netinet/icmp6.h> struct nd_router_solicit{};

Y * Y	<netinet/in.h>    IPPROTO_AH
N?N?Y	<netinet/in.h>    IPPROTO_DSTOPTS
Y * Y	<netinet/in.h>    IPPROTO_ESP
Y Y Y	<netinet/in.h>    IPPROTO_FRAGMENT
Y Y Y	<netinet/in.h>    IPPROTO_HOPOPTS
Y Y Y	<netinet/in.h>    IPPROTO_ICMPV6
Y Y Y	<netinet/in.h>    IPPROTO_IPV6
Y Y Y	<netinet/in.h>    IPPROTO_NONE
Y Y Y	<netinet/in.h>    IPPROTO_ROUTING
Y Y N	<netinet/in.h>    IPV6_DSTOPTS
Y Y N	<netinet/in.h>    IPV6_HOPLIMIT
Y Y N	<netinet/in.h>    IPV6_HOPOPTS
Y Y N	<netinet/in.h>    IPV6_NEXTHOP
Y Y N	<netinet/in.h>    IPV6_PKTINFO
Y Y N	<netinet/in.h>    IPV6_PKTOPTIONS
Y Y N	<netinet/in.h>    IPV6_RTHDR
N N N	<netinet/in.h>    IPV6_RTHDR_LOOSE
N N N	<netinet/in.h>    IPV6_RTHDR_STRICT
N N N	<netinet/in.h>    IPV6_RTHDR_TYPE_0
Y Y Y	<netinet/in.h>    struct in6_pktinfo{};

Y N*Y	<netinet/ip6.h>   IP6F_OFF_MASK
Y N*Y	<netinet/ip6.h>   IP6F_RESERVED_MASK
Y N*Y	<netinet/ip6.h>   IP6F_MORE_FRAG
N N Y	<netinet/ip6.h>   struct ip6_dest{};
N N Y	<netinet/ip6.h>   struct ip6_frag{};
N N Y	<netinet/ip6.h>   struct ip6_hbh{};
N N Y	<netinet/ip6.h>   struct ip6_hdr{};
N N Y	<netinet/ip6.h>   struct ip6_rthdr{};
N N Y	<netinet/ip6.h>   struct ip6_rthdr0{};

N N Y	<sys/socket.h>    struct cmsghdr{};
N N Y	<sys/socket.h>    struct msghdr{};

	   The following list summarizes the function and macro prototypes
	   discussed in this memo, sorted by header.

N N Y	<netinet/icmp6.h> void ICMP6_FILTER_SETBLOCK(int,
	                                                struct icmp6_filter *);
N N Y	<netinet/icmp6.h> void ICMP6_FILTER_SETBLOCKALL(struct
icmp6_filter *);
N N Y	<netinet/icmp6.h> void ICMP6_FILTER_SETPASS(int, struct
icmp6_filter *);
N N Y	<netinet/icmp6.h> void ICMP6_FILTER_SETPASSALL(struct icmp6_filter
*);
N N Y	<netinet/icmp6.h> int  ICMP6_FILTER_WILLBLOCK(int,
	                                           const struct icmp6_filter
*);
N N Y	<netinet/icmp6.h> int  ICMP6_FILTER_WILLPASS(int,
	                                           const struct icmp6_filter
*);

N N Y	<netinet/in.h>    int IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
	                                         const struct in6_addr *);

N N N	<netinet/in.h>    uint8_t *inet6_option_alloc(struct cmsghdr *,
	                                               int, int, int);
N N N	<netinet/in.h>    int inet6_option_append(struct cmsghdr *,
	                                          const uint8_t *, int, int);
N N N	<netinet/in.h>    int inet6_option_find(const struct cmsghdr *,
	                                        uint8_t *, int);
N N N	<netinet/in.h>    int inet6_option_init(void *, struct cmsghdr **,
int);
N N N	<netinet/in.h>    int inet6_option_next(const struct cmsghdr *,
	                                        uint8_t **);
N N N	<netinet/in.h>    int inet6_option_space(int);

N N N	<netinet/in.h>    int inet6_rthdr_add(struct cmsghdr *,
	                                      const struct in6_addr *,
	                                      unsigned int);
N N N	<netinet/in.h>    struct in6_addr inet6_rthdr_getaddr(struct
cmsghdr *,
	                                                      int);
N N N	<netinet/in.h>    int inet6_rthdr_getflags(const struct cmsghdr *,
int);
N N N	<netinet/in.h>    struct cmsghdr *inet6_rthdr_init(void *, int);
N N N	<netinet/in.h>    int inet6_rthdr_lasthop(struct cmsghdr *,
	                                                          unsigned
int);
N N N	<netinet/in.h>    int inet6_rthdr_reverse(const struct cmsghdr *,
	                                          struct cmsghdr *);
N N N	<netinet/in.h>    int inet6_rthdr_segments(const struct cmsghdr
*);
N N N	<netinet/in.h>    size_t inet6_rthdr_space(int, int);
Y Y Y	<sys/socket.h>    unsigned char *CMSG_DATA(const struct cmsghdr
*);
Y Y Y	<sys/socket.h>    struct cmsghdr *CMSG_FIRSTHDR(const struct
msghdr *);
Y Y Y	<sys/socket.h>    unsigned int CMSG_LEN(unsigned int);
Y Y Y	<sys/socket.h>    struct cmsghdr *CMSG_NXTHDR(const struct msghdr
*mhdr,
	                                              const struct cmsghdr *);
Y Y Y	<sys/socket.h>    unsigned int CMSG_SPACE(unsigned int);

N N N	<unistd.h>        int rresvport_af(int *, int);






More information about the cgl_discussion mailing list