| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: in.h,v 1.114 2021/02/03 18:13:13 roy Exp $ */ | | 1 | /* $NetBSD: in.h,v 1.115 2023/06/16 03:02:30 rin Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1982, 1986, 1990, 1993 | | 4 | * Copyright (c) 1982, 1986, 1990, 1993 |
5 | * The Regents of the University of California. All rights reserved. | | 5 | * The Regents of the University of California. All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -97,27 +97,27 @@ typedef __sa_family_t sa_family_t; | | | @@ -97,27 +97,27 @@ typedef __sa_family_t sa_family_t; |
97 | #define IPPROTO_IPV6_ICMP 58 /* IPv6 ICMP */ | | 97 | #define IPPROTO_IPV6_ICMP 58 /* IPv6 ICMP */ |
98 | #define IPPROTO_ICMPV6 58 /* ICMP6 */ | | 98 | #define IPPROTO_ICMPV6 58 /* ICMP6 */ |
99 | #define IPPROTO_NONE 59 /* IP6 no next header */ | | 99 | #define IPPROTO_NONE 59 /* IP6 no next header */ |
100 | #define IPPROTO_DSTOPTS 60 /* IP6 destination option */ | | 100 | #define IPPROTO_DSTOPTS 60 /* IP6 destination option */ |
101 | #define IPPROTO_EON 80 /* ISO cnlp */ | | 101 | #define IPPROTO_EON 80 /* ISO cnlp */ |
102 | #define IPPROTO_ETHERIP 97 /* Ethernet-in-IP */ | | 102 | #define IPPROTO_ETHERIP 97 /* Ethernet-in-IP */ |
103 | #define IPPROTO_ENCAP 98 /* encapsulation header */ | | 103 | #define IPPROTO_ENCAP 98 /* encapsulation header */ |
104 | #define IPPROTO_PIM 103 /* Protocol indep. multicast */ | | 104 | #define IPPROTO_PIM 103 /* Protocol indep. multicast */ |
105 | #define IPPROTO_IPCOMP 108 /* IP Payload Comp. Protocol */ | | 105 | #define IPPROTO_IPCOMP 108 /* IP Payload Comp. Protocol */ |
106 | #define IPPROTO_VRRP 112 /* VRRP RFC 2338 */ | | 106 | #define IPPROTO_VRRP 112 /* VRRP RFC 2338 */ |
107 | #define IPPROTO_CARP 112 /* Common Address Resolution Protocol */ | | 107 | #define IPPROTO_CARP 112 /* Common Address Resolution Protocol */ |
108 | #define IPPROTO_L2TP 115 /* L2TPv3 */ | | 108 | #define IPPROTO_L2TP 115 /* L2TPv3 */ |
109 | #define IPPROTO_SCTP 132 /* SCTP */ | | 109 | #define IPPROTO_SCTP 132 /* SCTP */ |
110 | #define IPPROTO_PFSYNC 240 /* PFSYNC */ | | 110 | #define IPPROTO_PFSYNC 240 /* PFSYNC */ |
111 | #define IPPROTO_RAW 255 /* raw IP packet */ | | 111 | #define IPPROTO_RAW 255 /* raw IP packet */ |
112 | #define IPPROTO_MAX 256 | | 112 | #define IPPROTO_MAX 256 |
113 | | | 113 | |
114 | /* last return value of *_input(), meaning "all job for this pkt is done". */ | | 114 | /* last return value of *_input(), meaning "all job for this pkt is done". */ |
115 | #define IPPROTO_DONE 257 | | 115 | #define IPPROTO_DONE 257 |
116 | | | 116 | |
117 | /* sysctl placeholder for (FAST_)IPSEC */ | | 117 | /* sysctl placeholder for (FAST_)IPSEC */ |
118 | #define CTL_IPPROTO_IPSEC 258 | | 118 | #define CTL_IPPROTO_IPSEC 258 |
119 | | | 119 | |
120 | | | 120 | |
121 | /* | | 121 | /* |
122 | * Local port number conventions: | | 122 | * Local port number conventions: |
123 | * | | 123 | * |
| @@ -343,42 +343,42 @@ struct ip_mreq { | | | @@ -343,42 +343,42 @@ struct ip_mreq { |
343 | | | 343 | |
344 | /* | | 344 | /* |
345 | * Names for IP sysctl objects | | 345 | * Names for IP sysctl objects |
346 | */ | | 346 | */ |
347 | #define IPCTL_FORWARDING 1 /* act as router */ | | 347 | #define IPCTL_FORWARDING 1 /* act as router */ |
348 | #define IPCTL_SENDREDIRECTS 2 /* may send redirects when forwarding */ | | 348 | #define IPCTL_SENDREDIRECTS 2 /* may send redirects when forwarding */ |
349 | #define IPCTL_DEFTTL 3 /* default TTL */ | | 349 | #define IPCTL_DEFTTL 3 /* default TTL */ |
350 | /* IPCTL_DEFMTU=4, never implemented */ | | 350 | /* IPCTL_DEFMTU=4, never implemented */ |
351 | #define IPCTL_FORWSRCRT 5 /* forward source-routed packets */ | | 351 | #define IPCTL_FORWSRCRT 5 /* forward source-routed packets */ |
352 | #define IPCTL_DIRECTEDBCAST 6 /* default broadcast behavior */ | | 352 | #define IPCTL_DIRECTEDBCAST 6 /* default broadcast behavior */ |
353 | #define IPCTL_ALLOWSRCRT 7 /* allow/drop all source-routed pkts */ | | 353 | #define IPCTL_ALLOWSRCRT 7 /* allow/drop all source-routed pkts */ |
354 | #define IPCTL_SUBNETSARELOCAL 8 /* treat subnets as local addresses */ | | 354 | #define IPCTL_SUBNETSARELOCAL 8 /* treat subnets as local addresses */ |
355 | #define IPCTL_MTUDISC 9 /* allow path MTU discovery */ | | 355 | #define IPCTL_MTUDISC 9 /* allow path MTU discovery */ |
356 | #define IPCTL_ANONPORTMIN 10 /* minimum ephemeral port */ | | 356 | #define IPCTL_ANONPORTMIN 10 /* minimum ephemeral port */ |
357 | #define IPCTL_ANONPORTMAX 11 /* maximum ephemeral port */ | | 357 | #define IPCTL_ANONPORTMAX 11 /* maximum ephemeral port */ |
358 | #define IPCTL_MTUDISCTIMEOUT 12 /* allow path MTU discovery */ | | 358 | #define IPCTL_MTUDISCTIMEOUT 12 /* allow path MTU discovery */ |
359 | #define IPCTL_MAXFLOWS 13 /* maximum ip flows allowed */ | | 359 | #define IPCTL_MAXFLOWS 13 /* maximum ip flows allowed */ |
360 | #define IPCTL_HOSTZEROBROADCAST 14 /* is host zero a broadcast addr? */ | | 360 | #define IPCTL_HOSTZEROBROADCAST 14 /* is host zero a broadcast addr? */ |
361 | #define IPCTL_GIF_TTL 15 /* default TTL for gif encap packet */ | | 361 | #define IPCTL_GIF_TTL 15 /* default TTL for gif encap packet */ |
362 | #define IPCTL_LOWPORTMIN 16 /* minimum reserved port */ | | 362 | #define IPCTL_LOWPORTMIN 16 /* minimum reserved port */ |
363 | #define IPCTL_LOWPORTMAX 17 /* maximum reserved port */ | | 363 | #define IPCTL_LOWPORTMAX 17 /* maximum reserved port */ |
364 | #define IPCTL_MAXFRAGPACKETS 18 /* max packets reassembly queue */ | | 364 | #define IPCTL_MAXFRAGPACKETS 18 /* max packets reassembly queue */ |
365 | #define IPCTL_GRE_TTL 19 /* default TTL for gre encap packet */ | | 365 | #define IPCTL_GRE_TTL 19 /* default TTL for gre encap packet */ |
366 | #define IPCTL_CHECKINTERFACE 20 /* drop pkts in from 'wrong' iface */ | | 366 | #define IPCTL_CHECKINTERFACE 20 /* drop pkts in from 'wrong' iface */ |
367 | #define IPCTL_IFQ 21 /* IP packet input queue */ | | 367 | #define IPCTL_IFQ 21 /* IP packet input queue */ |
368 | #define IPCTL_RANDOMID 22 /* use random IP ids (if configured) */ | | 368 | #define IPCTL_RANDOMID 22 /* use random IP ids (if configured) */ |
369 | #define IPCTL_LOOPBACKCKSUM 23 /* do IP checksum on loopback */ | | 369 | #define IPCTL_LOOPBACKCKSUM 23 /* do IP checksum on loopback */ |
370 | #define IPCTL_STATS 24 /* IP statistics */ | | 370 | #define IPCTL_STATS 24 /* IP statistics */ |
371 | #define IPCTL_DAD_COUNT 25 /* DAD packets to send */ | | 371 | #define IPCTL_DAD_COUNT 25 /* DAD packets to send */ |
372 | | | 372 | |
373 | #endif /* _NETBSD_SOURCE */ | | 373 | #endif /* _NETBSD_SOURCE */ |
374 | | | 374 | |
375 | /* INET6 stuff */ | | 375 | /* INET6 stuff */ |
376 | #define __KAME_NETINET_IN_H_INCLUDED_ | | 376 | #define __KAME_NETINET_IN_H_INCLUDED_ |
377 | #include <netinet6/in6.h> | | 377 | #include <netinet6/in6.h> |
378 | #undef __KAME_NETINET_IN_H_INCLUDED_ | | 378 | #undef __KAME_NETINET_IN_H_INCLUDED_ |
379 | | | 379 | |
380 | #ifdef _KERNEL | | 380 | #ifdef _KERNEL |
381 | #include <sys/psref.h> | | 381 | #include <sys/psref.h> |
382 | | | 382 | |
383 | /* | | 383 | /* |
384 | * in_cksum_phdr: | | 384 | * in_cksum_phdr: |