#![allow(overflowing_literals)]
#![allow(clippy::module_name_repetitions)]
use crate::sa_family_t;
pub const IPPROTO_IP: i32 = 0;
pub const IPPROTO_ICMP: i32 = 1;
pub const IPPROTO_TCP: i32 = 6;
pub const IPPROTO_UDP: i32 = 17;
pub const INADDR_ANY: in_addr_t = 0x0000_0000;
pub const INADDR_BROADCAST: in_addr_t = 0xffff_ffff;
pub type in_addr_t = u32;
pub type in_port_t = u16;
#[repr(C)]
pub struct in_addr_s {
pub s_addr: in_addr_t,
}
#[repr(C)]
pub struct sockaddr_in_t {
pub sin_len: u8,
pub sin_family: sa_family_t,
pub sin_port: in_port_t,
pub sin_addr: in_addr_s,
pub sin_zero: [u8; 8],
}
pub const IPPROTO_IPV6: i32 = 41;
pub const IPPROTO_RAW: i32 = 255;
pub const INET_ADDRSTRLEN: i32 = 16;
pub const IPPROTO_HOPOPTS: i32 = 0;
pub const IPPROTO_IGMP: i32 = 2;
pub const IPPROTO_GGP: i32 = 3;
pub const IPPROTO_IPV4: i32 = 4;
pub const IPPROTO_IPIP: i32 = IPPROTO_IPV4;
pub const IPPROTO_ST: i32 = 7;
pub const IPPROTO_EGP: i32 = 8;
pub const IPPROTO_PIGP: i32 = 9;
pub const IPPROTO_RCCMON: i32 = 10;
pub const IPPROTO_NVPII: i32 = 11;
pub const IPPROTO_PUP: i32 = 12;
pub const IPPROTO_ARGUS: i32 = 13;
pub const IPPROTO_EMCON: i32 = 14;
pub const IPPROTO_XNET: i32 = 15;
pub const IPPROTO_CHAOS: i32 = 16;
pub const IPPROTO_MUX: i32 = 18;
pub const IPPROTO_MEAS: i32 = 19;
pub const IPPROTO_HMP: i32 = 20;
pub const IPPROTO_PRM: i32 = 21;
pub const IPPROTO_IDP: i32 = 22;
pub const IPPROTO_TRUNK1: i32 = 23;
pub const IPPROTO_TRUNK2: i32 = 24;
pub const IPPROTO_LEAF1: i32 = 25;
pub const IPPROTO_LEAF2: i32 = 26;
pub const IPPROTO_RDP: i32 = 27;
pub const IPPROTO_IRTP: i32 = 28;
pub const IPPROTO_TP: i32 = 29;
pub const IPPROTO_BLT: i32 = 30;
pub const IPPROTO_NSP: i32 = 31;
pub const IPPROTO_INP: i32 = 32;
pub const IPPROTO_DCCP: i32 = 33;
pub const IPPROTO_3PC: i32 = 34;
pub const IPPROTO_IDPR: i32 = 35;
pub const IPPROTO_XTP: i32 = 36;
pub const IPPROTO_DDP: i32 = 37;
pub const IPPROTO_CMTP: i32 = 38;
pub const IPPROTO_TPXX: i32 = 39;
pub const IPPROTO_IL: i32 = 40;
pub const IPPROTO_SDRP: i32 = 42;
pub const IPPROTO_ROUTING: i32 = 43;
pub const IPPROTO_FRAGMENT: i32 = 44;
pub const IPPROTO_IDRP: i32 = 45;
pub const IPPROTO_RSVP: i32 = 46;
pub const IPPROTO_GRE: i32 = 47;
pub const IPPROTO_MHRP: i32 = 48;
pub const IPPROTO_BHA: i32 = 49;
pub const IPPROTO_ESP: i32 = 50;
pub const IPPROTO_AH: i32 = 51;
pub const IPPROTO_INLSP: i32 = 52;
pub const IPPROTO_SWIPE: i32 = 53;
pub const IPPROTO_NHRP: i32 = 54;
pub const IPPROTO_MOBILE: i32 = 55;
pub const IPPROTO_TLSP: i32 = 56;
pub const IPPROTO_SKIP: i32 = 57;
pub const IPPROTO_ICMPV6: i32 = 58;
pub const IPPROTO_NONE: i32 = 59;
pub const IPPROTO_DSTOPTS: i32 = 60;
pub const IPPROTO_AHIP: i32 = 61;
pub const IPPROTO_CFTP: i32 = 62;
pub const IPPROTO_HELLO: i32 = 63;
pub const IPPROTO_SATEXPAK: i32 = 64;
pub const IPPROTO_KRYPTOLAN: i32 = 65;
pub const IPPROTO_RVD: i32 = 66;
pub const IPPROTO_IPPC: i32 = 67;
pub const IPPROTO_ADFS: i32 = 68;
pub const IPPROTO_SATMON: i32 = 69;
pub const IPPROTO_VISA: i32 = 70;
pub const IPPROTO_IPCV: i32 = 71;
pub const IPPROTO_CPNX: i32 = 72;
pub const IPPROTO_CPHB: i32 = 73;
pub const IPPROTO_WSN: i32 = 74;
pub const IPPROTO_PVP: i32 = 75;
pub const IPPROTO_BRSATMON: i32 = 76;
pub const IPPROTO_ND: i32 = 77;
pub const IPPROTO_WBMON: i32 = 78;
pub const IPPROTO_WBEXPAK: i32 = 79;
pub const IPPROTO_EON: i32 = 80;
pub const IPPROTO_VMTP: i32 = 81;
pub const IPPROTO_SVMTP: i32 = 82;
pub const IPPROTO_VINES: i32 = 83;
pub const IPPROTO_TTP: i32 = 84;
pub const IPPROTO_IGP: i32 = 85;
pub const IPPROTO_DGP: i32 = 86;
pub const IPPROTO_TCF: i32 = 87;
pub const IPPROTO_IGRP: i32 = 88;
pub const IPPROTO_OSPFIGP: i32 = 89;
pub const IPPROTO_SRPC: i32 = 90;
pub const IPPROTO_LARP: i32 = 91;
pub const IPPROTO_MTP: i32 = 92;
pub const IPPROTO_AX25: i32 = 93;
pub const IPPROTO_IPEIP: i32 = 94;
pub const IPPROTO_MICP: i32 = 95;
pub const IPPROTO_SCCSP: i32 = 96;
pub const IPPROTO_ETHERIP: i32 = 97;
pub const IPPROTO_ENCAP: i32 = 98;
pub const IPPROTO_APES: i32 = 99;
pub const IPPROTO_GMTP: i32 = 100;
pub const IPPROTO_IPCOMP: i32 = 108;
pub const IPPROTO_SCTP: i32 = 132;
pub const IPPROTO_MH: i32 = 135;
pub const IPPROTO_UDPLITE: i32 = 136;
pub const IPPROTO_HIP: i32 = 139;
pub const IPPROTO_SHIM6: i32 = 140;
pub const IPPROTO_PIM: i32 = 103;
pub const IPPROTO_CARP: i32 = 112;
pub const IPPROTO_PGM: i32 = 113;
pub const IPPROTO_MPLS: i32 = 137;
pub const IPPROTO_PFSYNC: i32 = 240;
pub const IPPROTO_RESERVED_253: i32 = 253;
pub const IPPROTO_RESERVED_254: i32 = 254;
pub const IPPROTO_OLD_DIVERT: i32 = 254;
pub const IPPROTO_MAX: i32 = 256;
pub const IPPROTO_DONE: i32 = 257;
pub const IPPROTO_DIVERT: i32 = 258;
pub const IPPROTO_SEND: i32 = 259;
pub const IPPROTO_SPACER: i32 = 32767;
pub const IPPORT_RESERVED: i32 = 1024;
pub const IPPORT_EPHEMERALFIRST: i32 = 10000;
pub const IPPORT_EPHEMERALLAST: i32 = 65535;
pub const IPPORT_HIFIRSTAUTO: i32 = 49152;
pub const IPPORT_HILASTAUTO: i32 = 65535;
pub const IPPORT_RESERVEDSTART: i32 = 600;
pub const IPPORT_MAX: i32 = 65535;
#[must_use]
pub const fn IN_CLASSA(i: in_addr_t) -> bool {
(i & 0x8000_0000) == 0
}
pub const IN_CLASSA_NET: i32 = 0xff00_0000;
pub const IN_CLASSA_NSHIFT: i32 = 24;
pub const IN_CLASSA_HOST: i32 = 0x00ff_ffff;
pub const IN_CLASSA_MAX: i32 = 128;
#[must_use]
pub const fn IN_CLASSB(i: in_addr_t) -> bool {
(i & 0xc000_0000) == 0x8000_0000
}
pub const IN_CLASSB_NET: i32 = 0xffff_0000;
pub const IN_CLASSB_NSHIFT: i32 = 16;
pub const IN_CLASSB_HOST: i32 = 0x0000_ffff;
pub const IN_CLASSB_MAX: i32 = 65536;
#[must_use]
pub const fn IN_CLASSC(i: in_addr_t) -> bool {
(i & 0xe000_0000) == 0xc000_0000
}
pub const IN_CLASSC_NET: i32 = 0xffff_ff00;
pub const IN_CLASSC_NSHIFT: i32 = 8;
pub const IN_CLASSC_HOST: i32 = 0x0000_00ff;
pub const IN_NETMASK_DEFAULT: i32 = 0xffff_ff00;
#[must_use]
pub const fn IN_MULTICAST(i: in_addr_t) -> bool {
(i & 0xf000_0000) == 0xe000_0000
}
#[must_use]
#[inline]
pub const fn IN_CLASSD(i: in_addr_t) -> bool {
IN_MULTICAST(i)
}
pub const IN_CLASSD_NET: i32 = 0xf000_0000;
pub const IN_CLASSD_NSHIFT: i32 = 28;
pub const IN_CLASSD_HOST: i32 = 0x0fff_ffff;
#[must_use]
pub const fn IN_EXPERIMENTAL(i: in_addr_t) -> bool {
(i & 0xf000_0000) == 0xf000_0000
}
#[must_use]
pub const fn IN_BADCLASS(i: in_addr_t) -> bool {
(i & 0xf000_0000) == 0xf000_0000
}
#[must_use]
pub const fn IN_LINKLOCAL(i: in_addr_t) -> bool {
(i & 0xffff_0000) == 0xa9fe_0000
}
#[must_use]
pub const fn IN_LOOPBACK(i: in_addr_t) -> bool {
(i & 0xff00_0000) == 0x7f00_0000
}
#[must_use]
pub const fn IN_ZERONET(i: in_addr_t) -> bool {
(i & 0xff00_0000) == 0
}
#[must_use]
pub const fn IN_PRIVATE(i: in_addr_t) -> bool {
((i & 0xff00_0000) == 0x0a00_0000)
|| ((i & 0xfff0_0000) == 0xac10_0000)
|| ((i & 0xffff_0000) == 0xc0a8_0000)
}
#[must_use]
pub const fn IN_LOCAL_GROUP(i: in_addr_t) -> bool {
(i & 0xffff_ff00) == 0xe000_0000
}
#[must_use]
pub const fn IN_ANY_LOCAL(i: in_addr_t) -> bool {
IN_LINKLOCAL(i) || IN_LOCAL_GROUP(i)
}
pub const INADDR_LOOPBACK: in_addr_t = 0x7f00_0001;
pub const INADDR_NONE: in_addr_t = 0xffff_ffff;
pub const INADDR_UNSPEC_GROUP: in_addr_t = 0xe000_0000;
pub const INADDR_ALLHOSTS_GROUP: in_addr_t = 0xe000_0001;
pub const INADDR_ALLRTRS_GROUP: in_addr_t = 0xe000_0002;
pub const INADDR_ALLRPTS_GROUP: in_addr_t = 0xe000_0016;
pub const INADDR_CARP_GROUP: in_addr_t = 0xe000_0012;
pub const INADDR_PFSYNC_GROUP: in_addr_t = 0xe000_00f0;
pub const INADDR_ALLMDNS_GROUP: in_addr_t = 0xe000_00fb;
pub const INADDR_MAX_LOCAL_GROUP: in_addr_t = 0xe000_00ff;
pub const IN_LOOPBACKNET: i32 = 127;
pub const IN_RFC3021_MASK: in_addr_t = 0xffff_fffe;
pub const IP_OPTIONS: i32 = 1;
pub const IP_HDRINCL: i32 = 2;
pub const IP_TOS: i32 = 3;
pub const IP_TTL: i32 = 4;
pub const IP_RECVOPTS: i32 = 5;
pub const IP_RECVRETOPTS: i32 = 6;
pub const IP_RECVDSTADDR: i32 = 7;
pub const IP_SENDSRCADDR: i32 = IP_RECVDSTADDR;
pub const IP_RETOPTS: i32 = 8;
pub const IP_MULTICAST_IF: i32 = 9;
pub const IP_MULTICAST_TTL: i32 = 10;
pub const IP_MULTICAST_LOOP: i32 = 11;
pub const IP_ADD_MEMBERSHIP: i32 = 12;
pub const IP_DROP_MEMBERSHIP: i32 = 13;
pub const IP_MULTICAST_VIF: i32 = 14;
pub const IP_RSVP_ON: i32 = 15;
pub const IP_RSVP_OFF: i32 = 16;
pub const IP_RSVP_VIF_ON: i32 = 17;
pub const IP_RSVP_VIF_OFF: i32 = 18;
pub const IP_PORTRANGE: i32 = 19;
pub const IP_RECVIF: i32 = 20;
pub const IP_IPSEC_POLICY: i32 = 21;
pub const IP_ONESBCAST: i32 = 23;
pub const IP_BINDANY: i32 = 24;
pub const IP_BINDMULTI: i32 = 25;
pub const IP_RSS_LISTEN_BUCKET: i32 = 26;
pub const IP_ORIGDSTADDR: i32 = 27;
pub const IP_RECVORIGDSTADDR: i32 = IP_ORIGDSTADDR;
pub const IP_FW_TABLE_ADD: i32 = 40;
pub const IP_FW_TABLE_DEL: i32 = 41;
pub const IP_FW_TABLE_FLUSH: i32 = 42;
pub const IP_FW_TABLE_GETSIZE: i32 = 43;
pub const IP_FW_TABLE_LIST: i32 = 44;
pub const IP_FW3: i32 = 48;
pub const IP_DUMMYNET3: i32 = 49;
pub const IP_FW_ADD: i32 = 50;
pub const IP_FW_DEL: i32 = 51;
pub const IP_FW_FLUSH: i32 = 52;
pub const IP_FW_ZERO: i32 = 53;
pub const IP_FW_GET: i32 = 54;
pub const IP_FW_RESETLOG: i32 = 55;
pub const IP_FW_NAT_CFG: i32 = 56;
pub const IP_FW_NAT_DEL: i32 = 57;
pub const IP_FW_NAT_GET_CONFIG: i32 = 58;
pub const IP_FW_NAT_GET_LOG: i32 = 59;
pub const IP_DUMMYNET_CONFIGURE: i32 = 60;
pub const IP_DUMMYNET_DEL: i32 = 61;
pub const IP_DUMMYNET_FLUSH: i32 = 62;
pub const IP_DUMMYNET_GET: i32 = 64;
pub const IP_RECVTTL: i32 = 65;
pub const IP_MINTTL: i32 = 66;
pub const IP_DONTFRAG: i32 = 67;
pub const IP_RECVTOS: i32 = 68;
pub const IP_ADD_SOURCE_MEMBERSHIP: i32 = 70;
pub const IP_DROP_SOURCE_MEMBERSHIP: i32 = 71;
pub const IP_BLOCK_SOURCE: i32 = 72;
pub const IP_UNBLOCK_SOURCE: i32 = 73;
pub const IP_MSFILTER: i32 = 74;
pub const IP_VLAN_PCP: i32 = 75;
pub const MCAST_JOIN_GROUP: i32 = 80;
pub const MCAST_LEAVE_GROUP: i32 = 81;
pub const MCAST_JOIN_SOURCE_GROUP: i32 = 82;
pub const MCAST_LEAVE_SOURCE_GROUP: i32 = 83;
pub const MCAST_BLOCK_SOURCE: i32 = 84;
pub const MCAST_UNBLOCK_SOURCE: i32 = 85;
pub const IP_FLOWID: i32 = 90;
pub const IP_FLOWTYPE: i32 = 91;
pub const IP_RSSBUCKETID: i32 = 92;
pub const IP_RECVFLOWID: i32 = 93;
pub const IP_RECVRSSBUCKETID: i32 = 94;
pub const IP_DEFAULT_MULTICAST_TTL: i32 = 1;
pub const IP_DEFAULT_MULTICAST_LOOP: i32 = 1;
pub const IP_MAX_MEMBERSHIPS: i32 = 4095;
pub const IP_MAX_GROUP_SRC_FILTER: i32 = 512;
pub const IP_MAX_SOCK_SRC_FILTER: i32 = 128;
pub const IP_MAX_SOCK_MUTE_FILTER: i32 = 128;
pub const MCAST_UNDEFINED: i32 = 0;
pub const MCAST_INCLUDE: i32 = 1;
pub const MCAST_EXCLUDE: i32 = 2;
pub const IP_PORTRANGE_DEFAULT: i32 = 0;
pub const IP_PORTRANGE_HIGH: i32 = 1;
pub const IP_PORTRANGE_LOW: i32 = 2;
pub const IPCTL_FORWARDING: i32 = 1;
pub const IPCTL_SENDREDIRECTS: i32 = 2;
pub const IPCTL_DEFTTL: i32 = 3;
pub const IPCTL_DEFMTU: i32 = 4;
pub const IPCTL_SOURCEROUTE: i32 = 8;
pub const IPCTL_DIRECTEDBROADCAST: i32 = 9;
pub const IPCTL_INTRQMAXLEN: i32 = 10;
pub const IPCTL_INTRQDROPS: i32 = 11;
pub const IPCTL_STATS: i32 = 12;
pub const IPCTL_ACCEPTSOURCEROUTE: i32 = 13;
pub const IPCTL_FASTFORWARDING: i32 = 14;
pub const IPCTL_GIF_TTL: i32 = 16;
pub const IPCTL_INTRDQMAXLEN: i32 = 17;
pub const IPCTL_INTRDQDROPS: i32 = 18;