1/**
2    D header file for DragonFlyBSD's extensions to POSIX's netinet/in.h.
3
4    Copyright: Copyright 2017 -
5    License: $(WEB www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
6    Authors: $(HTTP jmdavisprog.com, Jonathan M Davis) and Diederik de Groot
7 */
8module core.sys.dragonflybsd.netinet.in_;
9
10version (DragonFlyBSD):
11
12import core.sys.dragonflybsd.sys.cdefs;
13
14public import core.sys.posix.netinet.in_;
15
16extern(C) nothrow @nogc @system:
17
18enum IPPROTO_HOPOPTS   = 0;
19
20enum IPPROTO_IPV4      = 4;
21enum IPPROTO_IPIP      = IPPROTO_IPV4;
22enum IPPROTO_ST        = 7;
23enum IPPROTO_EGP       = 8;
24enum IPPROTO_PIGP      = 9;
25enum IPPROTO_RCCMON    = 10;
26enum IPPROTO_NVPII     = 11;
27
28enum IPPROTO_ARGUS     = 13;
29enum IPPROTO_EMCON     = 14;
30enum IPPROTO_XNET      = 15;
31enum IPPROTO_CHAOS     = 16;
32enum IPPROTO_MUX       = 18;
33enum IPPROTO_MEAS      = 19;
34enum IPPROTO_HMP       = 20;
35enum IPPROTO_PRM       = 21;
36
37enum IPPROTO_TRUNK1    = 23;
38enum IPPROTO_TRUNK2    = 24;
39enum IPPROTO_LEAF1     = 25;
40enum IPPROTO_LEAF2     = 26;
41enum IPPROTO_RDP       = 27;
42enum IPPROTO_IRTP      = 28;
43enum IPPROTO_TP        = 29;
44enum IPPROTO_BLT       = 30;
45enum IPPROTO_NSP       = 31;
46enum IPPROTO_INP       = 32;
47enum IPPROTO_SEP       = 33;
48enum IPPROTO_3PC       = 34;
49enum IPPROTO_IDPR      = 35;
50enum IPPROTO_XTP       = 36;
51enum IPPROTO_DDP       = 37;
52enum IPPROTO_CMTP      = 38;
53enum IPPROTO_TPXX      = 39;
54enum IPPROTO_IL        = 40;
55enum IPPROTO_SDRP      = 42;
56enum IPPROTO_ROUTING   = 43;
57enum IPPROTO_FRAGMENT  = 44;
58enum IPPROTO_IDRP      = 45;
59enum IPPROTO_RSVP      = 46;
60enum IPPROTO_GRE       = 47;
61enum IPPROTO_MHRP      = 48;
62enum IPPROTO_BHA       = 49;
63enum IPPROTO_ESP       = 50;
64enum IPPROTO_AH        = 51;
65enum IPPROTO_INLSP     = 52;
66enum IPPROTO_SWIPE     = 53;
67enum IPPROTO_NHRP      = 54;
68enum IPPROTO_MOBILE    = 55;
69enum IPPROTO_TLSP      = 56;
70enum IPPROTO_SKIP      = 57;
71enum IPPROTO_ICMPV6    = 58;
72enum IPPROTO_NONE      = 59;
73enum IPPROTO_DSTOPTS   = 60;
74enum IPPROTO_AHIP      = 61;
75enum IPPROTO_CFTP      = 62;
76enum IPPROTO_HELLO     = 63;
77enum IPPROTO_SATEXPAK  = 64;
78enum IPPROTO_KRYPTOLAN = 65;
79enum IPPROTO_RVD       = 66;
80enum IPPROTO_IPPC      = 67;
81enum IPPROTO_ADFS      = 68;
82enum IPPROTO_SATMON    = 69;
83enum IPPROTO_VISA      = 70;
84enum IPPROTO_IPCV      = 71;
85enum IPPROTO_CPNX      = 72;
86enum IPPROTO_CPHB      = 73;
87enum IPPROTO_WSN       = 74;
88enum IPPROTO_PVP       = 75;
89enum IPPROTO_BRSATMON  = 76;
90
91enum IPPROTO_WBMON     = 78;
92enum IPPROTO_WBEXPAK   = 79;
93enum IPPROTO_EON       = 80;
94enum IPPROTO_VMTP      = 81;
95enum IPPROTO_SVMTP     = 82;
96enum IPPROTO_VINES     = 83;
97enum IPPROTO_TTP       = 84;
98enum IPPROTO_IGP       = 85;
99enum IPPROTO_DGP       = 86;
100enum IPPROTO_TCF       = 87;
101enum IPPROTO_IGRP      = 88;
102enum IPPROTO_OSPFIGP   = 89;
103enum IPPROTO_SRPC      = 90;
104enum IPPROTO_LARP      = 91;
105enum IPPROTO_MTP       = 92;
106enum IPPROTO_AX25      = 93;
107enum IPPROTO_IPEIP     = 94;
108enum IPPROTO_MICP      = 95;
109enum IPPROTO_SCCSP     = 96;
110enum IPPROTO_ETHERIP   = 97;
111enum IPPROTO_ENCAP     = 98;
112enum IPPROTO_APES      = 99;
113enum IPPROTO_GMTP      = 100;
114enum IPPROTO_IPCOMP    = 108;
115enum IPPROTO_SCTP      = 132;
116enum IPPROTO_MH        = 135;
117enum IPPROTO_UDPLITE   = 136;
118enum IPPROTO_HIP       = 139;
119enum IPPROTO_SHIM6     = 140;
120
121enum IPPROTO_PIM          = 103;
122enum IPPROTO_CARP         = 112;
123enum IPPROTO_PGM          = 113;
124enum IPPROTO_MPLS         = 137;
125enum IPPROTO_PFSYNC       = 240;
126enum IPPROTO_RESERVED_253 = 253;
127enum IPPROTO_RESERVED_254 = 254;
128
129enum IPPROTO_DONE = 257;
130
131enum IPPORT_RESERVED = 1024;
132
133enum IPPORT_EPHEMERALFIRST = 10000;
134enum IPPORT_EPHEMERALLAST  = 65535;
135
136enum IPPORT_HIFIRSTAUTO = 49152;
137enum IPPORT_HILASTAUTO  = 65535;
138
139enum IPPORT_RESERVEDSTART = 600;
140
141enum IPPORT_MAX = 65535;
142
143extern(D) bool IN_CLASSA(in_addr_t i) pure @safe { return (i & 0x80000000) == 0; }
144enum IN_CLASSA_NET    = 0xff000000;
145enum IN_CLASSA_NSHIFT = 24;
146enum IN_CLASSA_HOST   = 0x00ffffff;
147enum IN_CLASSA_MAX    = 128;
148
149extern(D) bool IN_CLASSB(in_addr_t i) pure @safe { return (i & 0xc0000000) == 0x80000000; }
150enum IN_CLASSB_NET    = 0xffff0000;
151enum IN_CLASSB_NSHIFT = 16;
152enum IN_CLASSB_HOST   = 0x0000ffff;
153enum IN_CLASSB_MAX    = 65536;
154
155extern(D) bool IN_CLASSC(in_addr_t i) pure @safe { return (i & 0xe0000000) == 0xc0000000; }
156enum IN_CLASSC_NET    = 0xffffff00;
157enum IN_CLASSC_NSHIFT = 8;
158enum IN_CLASSC_HOST   = 0x000000ff;
159
160extern(D) bool IN_CLASSD(in_addr_t i) pure @safe { return (i & 0xf0000000) == 0xe0000000; }
161enum IN_CLASSD_NET     = 0xf0000000;
162enum IN_CLASSD_NSHIFT  = 28;
163enum IN_CLASSD_HOST    = 0x0fffffff;
164extern(D) bool IN_MULTICAST(in_addr_t i) { return IN_CLASSD(i); }
165
166// The fact that these are identical looks suspicious (they're not quite
167// identical on Linux). However, this _is_ how they're defined in DragonFlyBSD
168// and on OS X. So, while it _might_ be a bug, if it is, it's an upstream
169// one, and we're compatible with it.
170extern(D) bool IN_EXPERIMENTAL(in_addr_t i) pure @safe { return (i & 0xf0000000) == 0xf0000000; }
171extern(D) bool IN_BADCLASS(in_addr_t i) pure @safe { return (i & 0xf0000000) == 0xf0000000; }
172
173extern(D) bool IN_LINKLOCAL(in_addr_t i) pure @safe { return (i & 0xffff0000) == 0xa9fe0000; }
174extern(D) bool IN_LOOPBACK(in_addr_t i) pure @safe { return (i & 0xff000000) == 0x7f000000; }
175extern(D) bool IN_ZERONET(in_addr_t i) pure @safe { return (i & 0xff000000) == 0; }
176
177extern(D) bool IN_PRIVATE(in_addr_t i) pure @safe
178{
179    return  (i & 0xff000000) == 0x0a000000 ||
180            (i & 0xfff00000) == 0xac100000 ||
181            (i & 0xffff0000) == 0xc0a80000;
182}
183
184extern(D) bool IN_LOCAL_GROUP(in_addr_t i) pure @safe { return (i & 0xffffff00) == 0xe0000000; }
185
186extern(D) bool IN_ANY_LOCAL(in_addr_t i) pure @safe { return IN_LINKLOCAL(i) || IN_LOCAL_GROUP(i); }
187
188enum INADDR_UNSPEC_GROUP    = 0xe0000000;
189enum INADDR_ALLHOSTS_GROUP  = 0xe0000001;
190enum INADDR_ALLRTRS_GROUP   = 0xe0000002;
191enum INADDR_ALLRPTS_GROUP   = 0xe0000016;
192enum INADDR_CARP_GROUP      = 0xe0000012;
193enum INADDR_PFSYNC_GROUP    = 0xe00000f0;
194enum INADDR_ALLMDNS_GROUP   = 0xe00000fb;
195enum INADDR_MAX_LOCAL_GROUP = 0xe00000ff;
196
197enum IN_LOOPBACKNET = 127;
198
199enum IN_RFC3021_MASK = 0xfffffffe;
200
201enum IP_OPTIONS      = 1;
202enum IP_HDRINCL      = 2;
203enum IP_TOS          = 3;
204enum IP_TTL          = 4;
205enum IP_RECVOPTS     = 5;
206enum IP_RECVRETOPTS  = 6;
207enum IP_RECVDSTADDR  = 7;
208enum IP_SENDSRCADDR  = IP_RECVDSTADDR;
209enum IP_RETOPTS      = 8;
210enum IP_MULTICAST_IF = 9;
211
212enum IP_MULTICAST_TTL   = 10;
213enum IP_MULTICAST_LOOP  = 11;
214enum IP_ADD_MEMBERSHIP  = 12;
215enum IP_DROP_MEMBERSHIP = 13;
216enum IP_MULTICAST_VIF   = 14;
217enum IP_RSVP_ON         = 15;
218enum IP_RSVP_OFF        = 16;
219enum IP_RSVP_VIF_ON     = 17;
220enum IP_RSVP_VIF_OFF    = 18;
221enum IP_PORTRANGE       = 19;
222enum IP_RECVIF          = 20;
223
224enum IP_IPSEC_POLICY = 21;
225
226enum IP_ONESBCAST         = 23;
227enum IP_BINDANY           = 24;
228enum IP_BINDMULTI         = 25;
229enum IP_RSS_LISTEN_BUCKET = 26;
230enum IP_ORIGDSTADDR       = 27;
231enum IP_RECVORIGDSTADDR   = IP_ORIGDSTADDR;
232
233enum IP_FW3       = 48;
234enum IP_DUMMYNET3 = 49;
235
236enum IP_ADD_SOURCE_MEMBERSHIP  = 70;
237enum IP_DROP_SOURCE_MEMBERSHIP = 71;
238enum IP_BLOCK_SOURCE           = 72;
239enum IP_UNBLOCK_SOURCE         = 73;
240
241enum MCAST_JOIN_GROUP         = 80;
242enum MCAST_LEAVE_GROUP        = 81;
243enum MCAST_JOIN_SOURCE_GROUP  = 82;
244enum MCAST_LEAVE_SOURCE_GROUP = 83;
245enum MCAST_BLOCK_SOURCE       = 84;
246enum MCAST_UNBLOCK_SOURCE     = 85;
247
248enum IP_FLOWID          = 90;
249enum IP_FLOWTYPE        = 91;
250enum IP_RSSBUCKETID     = 92;
251enum IP_RECVFLOWID      = 93;
252enum IP_RECVRSSBUCKETID = 94;
253
254enum IP_DEFAULT_MULTICAST_TTL  = 1;
255enum IP_DEFAULT_MULTICAST_LOOP = 1;
256
257enum IP_MIN_MEMBERSHIPS   = 31;
258enum IP_MAX_MEMBERSHIPS   = 4095;
259
260enum IP_MAX_GROUP_SRC_FILTER = 512;
261enum IP_MAX_SOCK_SRC_FILTER  = 128;
262
263struct ip_mreq
264{
265    in_addr imr_multiaddr;
266    in_addr imr_interface;
267}
268
269struct ip_mreqn
270{
271    in_addr imr_multiaddr;
272    in_addr imr_address;
273    int     imr_ifindex;
274}
275
276struct ip_mreq_source
277{
278    in_addr imr_multiaddr;
279    in_addr imr_sourceaddr;
280    in_addr imr_interface;
281}
282
283struct group_req
284{
285    uint gr_interface;
286    sockaddr_storage gr_group;
287}
288
289struct group_source_req
290{
291    uint gsr_interface;
292    sockaddr_storage gsr_group;
293    sockaddr_storage gsr_source;
294}
295
296int setipv4sourcefilter(int, in_addr, in_addr, uint, uint, in_addr*);
297int getipv4sourcefilter(int, in_addr, in_addr, uint*, uint*, in_addr*);
298int setsourcefilter(int, uint, sockaddr*, socklen_t, uint, uint, sockaddr_storage*);
299int getsourcefilter(int, uint, sockaddr*, socklen_t, uint*, uint*, sockaddr_storage*);
300
301enum MCAST_UNDEFINED = 0;
302enum MCAST_INCLUDE   = 1;
303enum MCAST_EXCLUDE   = 2;
304
305enum IP_PORTRANGE_DEFAULT = 0;
306enum IP_PORTRANGE_HIGH    = 1;
307enum IP_PORTRANGE_LOW     = 2;
308
309enum IPCTL_FORWARDING        = 1;
310enum IPCTL_SENDREDIRECTS     = 2;
311enum IPCTL_DEFTTL            = 3;
312enum IPCTL_DEFMTU            = 4;
313enum IPCTL_SOURCEROUTE       = 8;
314enum IPCTL_DIRECTEDBROADCAST = 9;
315enum IPCTL_INTRQMAXLEN       = 10;
316enum IPCTL_INTRQDROPS        = 11;
317enum IPCTL_STATS             = 12;
318enum IPCTL_ACCEPTSOURCEROUTE = 13;
319enum IPCTL_FASTFORWARDING    = 14;
320enum IPCTL_GIF_TTL           = 16;
321enum IPCTL_INTRDQMAXLEN      = 17;
322enum IPCTL_INTRDQDROPS       = 18;
323
324// =============================================================================
325// What follows is from netinet6/in6.h, but since netinet6/in6.h specifically
326// says that it should only be #included by #including netinet/in.h, it makes
327// more sense to put them in here so that the way they're imported corresponds
328// with the correct way of #including them in C/C++.
329// =============================================================================
330
331// The #if was around the #include of in6.h at the end of in.h.
332enum IPV6PORT_RESERVED    = 1024;
333enum IPV6PORT_ANONMIN     = 49152;
334enum IPV6PORT_ANONMAX     = 65535;
335enum IPV6PORT_RESERVEDMIN = 600;
336enum IPV6PORT_RESERVEDMAX = IPV6PORT_RESERVED - 1;
337
338enum IN6ADDR_ANY_INIT = in6_addr.init;
339enum IN6ADDR_LOOPBACK_INIT = in6_addr([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
340                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01]);
341enum IN6ADDR_NODELOCAL_ALLNODES_INIT = in6_addr([0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
342                                                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01]);
343enum IN6ADDR_INTFACELOCAL_ALLNODES_INIT = in6_addr([0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
344                                                    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01]);
345enum IN6ADDR_LINKLOCAL_ALLNODES_INIT = in6_addr([0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
346                                                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01]);
347enum IN6ADDR_LINKLOCAL_ALLROUTERS_INIT = in6_addr([0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
348                                                   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02]);
349enum IN6ADDR_LINKLOCAL_ALLV2ROUTERS_INIT = in6_addr([0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
350                                                     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16]);
351
352__gshared const in6_addr in6addr_nodelocal_allnodes;
353__gshared const in6_addr in6addr_linklocal_allnodes;
354__gshared const in6_addr in6addr_linklocal_allrouters;
355__gshared const in6_addr in6addr_linklocal_allv2routers;
356
357extern(D) bool IN6_ARE_ADDR_EQUAL(in6_addr* a, in6_addr* b) pure @safe { return *a == *b; }
358
359enum __IPV6_ADDR_SCOPE_NODELOCAL    = 0x01;
360enum __IPV6_ADDR_SCOPE_INTFACELOCAL = 0x01;
361enum __IPV6_ADDR_SCOPE_LINKLOCAL    = 0x02;
362enum __IPV6_ADDR_SCOPE_SITELOCAL    = 0x05;
363enum __IPV6_ADDR_SCOPE_GLOBAL       = 0x0e;
364
365// TODO - requires declarations from elsewhere that we don't currently have bindings for.
366/+
367    struct route_in6
368    {
369        rtentry* ro_rt;
370        llentry* ro_lle;
371        char*    ro_prepend;
372        ushort   ro_plen;
373        ushort   ro_flags;
374        ushort   ro_mtu;
375        ushort   spare;
376        sockaddr_in6 ro_dst;
377    };
378+/
379
380enum IPV6_SOCKOPT_RESERVED1 = 3;
381enum IPV6_PORTRANGE         = 14;
382enum ICMP6_FILTER           = 18;
383
384enum IPV6_CHECKSUM = 26;
385
386enum IPV6_IPSEC_POLICY = 28;
387
388enum IPV6_FW_ADD   = 30;
389enum IPV6_FW_DEL   = 31;
390enum IPV6_FW_FLUSH = 32;
391enum IPV6_FW_ZERO  = 33;
392enum IPV6_FW_GET   = 34;
393
394enum IPV6_RTHDRDSTOPTS = 35;
395
396enum IPV6_RECVPKTINFO  = 36;
397enum IPV6_RECVHOPLIMIT = 37;
398enum IPV6_RECVRTHDR    = 38;
399enum IPV6_RECVHOPOPTS  = 39;
400enum IPV6_RECVDSTOPTS  = 40;
401
402enum IPV6_USE_MIN_MTU = 42;
403enum IPV6_RECVPATHMTU = 43;
404
405enum IPV6_PATHMTU = 44;
406
407enum IPV6_PKTINFO  = 46;
408enum IPV6_HOPLIMIT = 47;
409enum IPV6_NEXTHOP  = 48;
410enum IPV6_HOPOPTS  = 49;
411enum IPV6_DSTOPTS  = 50;
412enum IPV6_RTHDR    = 51;
413
414enum IPV6_RECVTCLASS = 57;
415
416enum IPV6_AUTOFLOWLABEL = 59;
417
418enum IPV6_TCLASS   = 61;
419enum IPV6_DONTFRAG = 62;
420
421enum IPV6_PREFER_TEMPADDR = 63;
422
423enum IPV6_BINDANY   = 64;
424
425enum IPV6_BINDMULTI         = 65;
426enum IPV6_RSS_LISTEN_BUCKET = 66;
427enum IPV6_FLOWID            = 67;
428enum IPV6_FLOWTYPE          = 68;
429enum IPV6_RSSBUCKETID       = 69;
430enum IPV6_RECVFLOWID        = 70;
431enum IPV6_RECVRSSBUCKETID   = 71;
432
433enum IPV6_ORIGDSTADDR     = 72;
434enum IPV6_RECVORIGDSTADDR = IPV6_ORIGDSTADDR;
435
436enum IPV6_RTHDR_LOOSE  = 0;
437enum IPV6_RTHDR_STRICT = 1;
438enum IPV6_RTHDR_TYPE_0 = 0;
439
440enum IPV6_DEFAULT_MULTICAST_HOPS = 1;
441enum IPV6_DEFAULT_MULTICAST_LOOP = 1;
442
443enum IPV6_MIN_MEMBERSHIPS = 31;
444enum IPV6_MAX_MEMBERSHIPS = 4095;
445
446enum IPV6_MAX_GROUP_SRC_FILTER = 512;
447enum IPV6_MAX_SOCK_SRC_FILTER  = 128;
448
449struct in6_pktinfo
450{
451    in6_addr ipi6_addr;
452    uint     ipi6_ifindex;
453}
454
455struct ip6_mtuinfo
456{
457    sockaddr_in6 ip6m_addr;
458    uint         ip6m_mtu;
459}
460
461enum IPV6_PORTRANGE_DEFAULT = 0;
462enum IPV6_PORTRANGE_HIGH    = 1;
463enum IPV6_PORTRANGE_LOW     = 2;
464
465enum IPV6PROTO_MAXID =  IPPROTO_PIM + 1;
466
467enum IPV6CTL_FORWARDING         = 1;
468enum IPV6CTL_SENDREDIRECTS      = 2;
469enum IPV6CTL_DEFHLIM            = 3;
470enum IPV6CTL_DEFMTU             = 4;
471enum IPV6CTL_FORWSRCRT          = 5;
472enum IPV6CTL_STATS              = 6;
473enum IPV6CTL_MRTSTATS           = 7;
474enum IPV6CTL_MRTPROTO           = 8;
475enum IPV6CTL_MAXFRAGPACKETS     = 9;
476enum IPV6CTL_SOURCECHECK        = 10;
477enum IPV6CTL_SOURCECHECK_LOGINT = 11;
478enum IPV6CTL_ACCEPT_RTADV       = 12;
479
480enum IPV6CTL_LOG_INTERVAL   = 14;
481enum IPV6CTL_HDRNESTLIMIT   = 15;
482enum IPV6CTL_DAD_COUNT      = 16;
483enum IPV6CTL_AUTO_FLOWLABEL = 17;
484enum IPV6CTL_DEFMCASTHLIM   = 18;
485enum IPV6CTL_GIF_HLIM       = 19;
486enum IPV6CTL_KAME_VERSION   = 20;
487enum IPV6CTL_USE_DEPRECATED = 21;
488enum IPV6CTL_RR_PRUNE       = 22;
489enum IPV6CTL_V6ONLY         = 24;
490
491enum IPV6CTL_USETEMPADDR     = 32;
492enum IPV6CTL_TEMPPLTIME      = 33;
493enum IPV6CTL_TEMPVLTIME      = 34;
494enum IPV6CTL_AUTO_LINKLOCAL  = 35;
495enum IPV6CTL_RIP6STATS       = 36;
496enum IPV6CTL_PREFER_TEMPADDR = 37;
497enum IPV6CTL_ADDRCTLPOLICY   = 38;
498enum IPV6CTL_USE_DEFAULTZONE = 39;
499
500enum IPV6CTL_MAXFRAGS   = 41;
501enum IPV6CTL_MCAST_PMTU = 44;
502
503enum IPV6CTL_STEALTH = 45;
504
505enum ICMPV6CTL_ND6_ONLINKNSRFC4861 = 47;
506enum IPV6CTL_NO_RADR     = 48;
507enum IPV6CTL_NORBIT_RAIF = 49;
508
509enum IPV6CTL_RFC6204W3 = 50;
510
511enum IPV6CTL_INTRQMAXLEN  = 51;
512enum IPV6CTL_INTRDQMAXLEN = 52;
513
514enum IPV6CTL_MAXID = 53;
515
516// TODO - require declarations from elsewhere that we don't currently have bindings for.
517/+
518enum M_FASTFWD_OURS  = M_PROTO1;
519enum M_IP6_NEXTHOP   = M_PROTO2;
520enum M_IP_NEXTHOP    = M_PROTO2;
521enum M_SKIP_FIREWALL = M_PROTO3;
522enum M_AUTHIPHDR     = M_PROTO4;
523enum M_DECRYPTED     = M_PROTO5;
524enum M_LOOP          = M_PROTO6;
525enum M_AUTHIPDGM     = M_PROTO7;
526enum M_RTALERT_MLD   = M_PROTO8;
527+/
528
529size_t inet6_rthdr_space(int, int) @trusted;
530cmsghdr* inet6_rthdr_init(void*, int);
531int inet6_rthdr_add(cmsghdr*, const in6_addr*, uint);
532int inet6_rthdr_lasthop(cmsghdr*, uint);
533int inet6_rthdr_segments(const cmsghdr*);
534in6_addr* inet6_rthdr_getaddr(cmsghdr*, int);
535int inet6_rthdr_getflags(const cmsghdr*, int);
536
537int inet6_opt_init(void*, socklen_t);
538int inet6_opt_append(void*, socklen_t, int, ubyte, socklen_t, ubyte, void**);
539int inet6_opt_finish(void*, socklen_t, int);
540int inet6_opt_set_val(void*, int, void*, socklen_t);
541
542int inet6_opt_next(void*, socklen_t, int, ubyte*, socklen_t*, void**);
543int inet6_opt_find(void*, socklen_t, int, ubyte, socklen_t*, void**);
544int inet6_opt_get_val(void*, int, void*, socklen_t);
545socklen_t inet6_rth_space(int, int) @trusted;
546void* inet6_rth_init(void*, socklen_t, int, int);
547int inet6_rth_add(void*, const in6_addr*);
548int inet6_rth_reverse(const void*, void*);
549int inet6_rth_segments(const void*);
550in6_addr* inet6_rth_getaddr(const void*, int);
551