| ... | @@ -344,43 +344,6 @@ pub const SOCK_SEQPACKET = 5; | ... | @@ -344,43 +344,6 @@ pub const SOCK_SEQPACKET = 5; |
| 344 | pub const SOCK_CLOEXEC = 0x10000000; | 344 | pub const SOCK_CLOEXEC = 0x10000000; |
| 345 | pub const SOCK_NONBLOCK = 0x20000000; | 345 | pub const SOCK_NONBLOCK = 0x20000000; |
| 346 | | 346 | |
| 347 | pub const PROTO_ip = 0o000; | | |
| 348 | pub const PROTO_icmp = 0o001; | | |
| 349 | pub const PROTO_igmp = 0o002; | | |
| 350 | pub const PROTO_ggp = 0o003; | | |
| 351 | pub const PROTO_ipencap = 0o004; | | |
| 352 | pub const PROTO_st = 0o005; | | |
| 353 | pub const PROTO_tcp = 0o006; | | |
| 354 | pub const PROTO_egp = 0o010; | | |
| 355 | pub const PROTO_pup = 0o014; | | |
| 356 | pub const PROTO_udp = 0o021; | | |
| 357 | pub const PROTO_hmp = 0o024; | | |
| 358 | pub const PROTO_xns_idp = 0o026; | | |
| 359 | pub const PROTO_rdp = 0o033; | | |
| 360 | pub const PROTO_iso_tp4 = 0o035; | | |
| 361 | pub const PROTO_xtp = 0o044; | | |
| 362 | pub const PROTO_ddp = 0o045; | | |
| 363 | pub const PROTO_idpr_cmtp = 0o046; | | |
| 364 | pub const PROTO_ipv6 = 0o051; | | |
| 365 | pub const PROTO_ipv6_route = 0o053; | | |
| 366 | pub const PROTO_ipv6_frag = 0o054; | | |
| 367 | pub const PROTO_idrp = 0o055; | | |
| 368 | pub const PROTO_rsvp = 0o056; | | |
| 369 | pub const PROTO_gre = 0o057; | | |
| 370 | pub const PROTO_esp = 0o062; | | |
| 371 | pub const PROTO_ah = 0o063; | | |
| 372 | pub const PROTO_skip = 0o071; | | |
| 373 | pub const PROTO_ipv6_icmp = 0o072; | | |
| 374 | pub const PROTO_ipv6_nonxt = 0o073; | | |
| 375 | pub const PROTO_ipv6_opts = 0o074; | | |
| 376 | pub const PROTO_rspf = 0o111; | | |
| 377 | pub const PROTO_vmtp = 0o121; | | |
| 378 | pub const PROTO_ospf = 0o131; | | |
| 379 | pub const PROTO_ipip = 0o136; | | |
| 380 | pub const PROTO_encap = 0o142; | | |
| 381 | pub const PROTO_pim = 0o147; | | |
| 382 | pub const PROTO_raw = 0o377; | | |
| 383 | | | |
| 384 | pub const PF_UNSPEC = 0; | 347 | pub const PF_UNSPEC = 0; |
| 385 | pub const PF_LOCAL = 1; | 348 | pub const PF_LOCAL = 1; |
| 386 | pub const PF_UNIX = PF_LOCAL; | 349 | pub const PF_UNIX = PF_LOCAL; |
| ... | @@ -971,3 +934,351 @@ pub const AT_REMOVEDIR = 0x0800; | ... | @@ -971,3 +934,351 @@ pub const AT_REMOVEDIR = 0x0800; |
| 971 | | 934 | |
| 972 | /// Fail if not under dirfd | 935 | /// Fail if not under dirfd |
| 973 | pub const AT_BENEATH = 0x1000; | 936 | pub const AT_BENEATH = 0x1000; |
| | 937 | |
| | 938 | /// dummy for IP |
| | 939 | pub const IPPROTO_IP = 0; |
| | 940 | |
| | 941 | /// control message protocol |
| | 942 | pub const IPPROTO_ICMP = 1; |
| | 943 | |
| | 944 | /// tcp |
| | 945 | pub const IPPROTO_TCP = 6; |
| | 946 | |
| | 947 | /// user datagram protocol |
| | 948 | pub const IPPROTO_UDP = 17; |
| | 949 | |
| | 950 | /// IP6 header |
| | 951 | pub const IPPROTO_IPV6 = 41; |
| | 952 | |
| | 953 | /// raw IP packet |
| | 954 | pub const IPPROTO_RAW = 255; |
| | 955 | |
| | 956 | /// IP6 hop-by-hop options |
| | 957 | pub const IPPROTO_HOPOPTS = 0; |
| | 958 | |
| | 959 | /// group mgmt protocol |
| | 960 | pub const IPPROTO_IGMP = 2; |
| | 961 | |
| | 962 | /// gateway^2 (deprecated) |
| | 963 | pub const IPPROTO_GGP = 3; |
| | 964 | |
| | 965 | /// IPv4 encapsulation |
| | 966 | pub const IPPROTO_IPV4 = 4; |
| | 967 | |
| | 968 | /// for compatibility |
| | 969 | pub const IPPROTO_IPIP = IPPROTO_IPV4; |
| | 970 | |
| | 971 | /// Stream protocol II |
| | 972 | pub const IPPROTO_ST = 7; |
| | 973 | |
| | 974 | /// exterior gateway protocol |
| | 975 | pub const IPPROTO_EGP = 8; |
| | 976 | |
| | 977 | /// private interior gateway |
| | 978 | pub const IPPROTO_PIGP = 9; |
| | 979 | |
| | 980 | /// BBN RCC Monitoring |
| | 981 | pub const IPPROTO_RCCMON = 10; |
| | 982 | |
| | 983 | /// network voice protocol |
| | 984 | pub const IPPROTO_NVPII = 11; |
| | 985 | |
| | 986 | /// pup |
| | 987 | pub const IPPROTO_PUP = 12; |
| | 988 | |
| | 989 | /// Argus |
| | 990 | pub const IPPROTO_ARGUS = 13; |
| | 991 | |
| | 992 | /// EMCON |
| | 993 | pub const IPPROTO_EMCON = 14; |
| | 994 | |
| | 995 | /// Cross Net Debugger |
| | 996 | pub const IPPROTO_XNET = 15; |
| | 997 | |
| | 998 | /// Chaos |
| | 999 | pub const IPPROTO_CHAOS = 16; |
| | 1000 | |
| | 1001 | /// Multiplexing |
| | 1002 | pub const IPPROTO_MUX = 18; |
| | 1003 | |
| | 1004 | /// DCN Measurement Subsystems |
| | 1005 | pub const IPPROTO_MEAS = 19; |
| | 1006 | |
| | 1007 | /// Host Monitoring |
| | 1008 | pub const IPPROTO_HMP = 20; |
| | 1009 | |
| | 1010 | /// Packet Radio Measurement |
| | 1011 | pub const IPPROTO_PRM = 21; |
| | 1012 | |
| | 1013 | /// xns idp |
| | 1014 | pub const IPPROTO_IDP = 22; |
| | 1015 | |
| | 1016 | /// Trunk-1 |
| | 1017 | pub const IPPROTO_TRUNK1 = 23; |
| | 1018 | |
| | 1019 | /// Trunk-2 |
| | 1020 | pub const IPPROTO_TRUNK2 = 24; |
| | 1021 | |
| | 1022 | /// Leaf-1 |
| | 1023 | pub const IPPROTO_LEAF1 = 25; |
| | 1024 | |
| | 1025 | /// Leaf-2 |
| | 1026 | pub const IPPROTO_LEAF2 = 26; |
| | 1027 | |
| | 1028 | /// Reliable Data |
| | 1029 | pub const IPPROTO_RDP = 27; |
| | 1030 | |
| | 1031 | /// Reliable Transaction |
| | 1032 | pub const IPPROTO_IRTP = 28; |
| | 1033 | |
| | 1034 | /// tp-4 w/ class negotiation |
| | 1035 | pub const IPPROTO_TP = 29; |
| | 1036 | |
| | 1037 | /// Bulk Data Transfer |
| | 1038 | pub const IPPROTO_BLT = 30; |
| | 1039 | |
| | 1040 | /// Network Services |
| | 1041 | pub const IPPROTO_NSP = 31; |
| | 1042 | |
| | 1043 | /// Merit Internodal |
| | 1044 | pub const IPPROTO_INP = 32; |
| | 1045 | |
| | 1046 | /// Datagram Congestion Control Protocol |
| | 1047 | pub const IPPROTO_DCCP = 33; |
| | 1048 | |
| | 1049 | /// Third Party Connect |
| | 1050 | pub const IPPROTO_3PC = 34; |
| | 1051 | |
| | 1052 | /// InterDomain Policy Routing |
| | 1053 | pub const IPPROTO_IDPR = 35; |
| | 1054 | |
| | 1055 | /// XTP |
| | 1056 | pub const IPPROTO_XTP = 36; |
| | 1057 | |
| | 1058 | /// Datagram Delivery |
| | 1059 | pub const IPPROTO_DDP = 37; |
| | 1060 | |
| | 1061 | /// Control Message Transport |
| | 1062 | pub const IPPROTO_CMTP = 38; |
| | 1063 | |
| | 1064 | /// TP++ Transport |
| | 1065 | pub const IPPROTO_TPXX = 39; |
| | 1066 | |
| | 1067 | /// IL transport protocol |
| | 1068 | pub const IPPROTO_IL = 40; |
| | 1069 | |
| | 1070 | /// Source Demand Routing |
| | 1071 | pub const IPPROTO_SDRP = 42; |
| | 1072 | |
| | 1073 | /// IP6 routing header |
| | 1074 | pub const IPPROTO_ROUTING = 43; |
| | 1075 | |
| | 1076 | /// IP6 fragmentation header |
| | 1077 | pub const IPPROTO_FRAGMENT = 44; |
| | 1078 | |
| | 1079 | /// InterDomain Routing |
| | 1080 | pub const IPPROTO_IDRP = 45; |
| | 1081 | |
| | 1082 | /// resource reservation |
| | 1083 | pub const IPPROTO_RSVP = 46; |
| | 1084 | |
| | 1085 | /// General Routing Encap. |
| | 1086 | pub const IPPROTO_GRE = 47; |
| | 1087 | |
| | 1088 | /// Mobile Host Routing |
| | 1089 | pub const IPPROTO_MHRP = 48; |
| | 1090 | |
| | 1091 | /// BHA |
| | 1092 | pub const IPPROTO_BHA = 49; |
| | 1093 | |
| | 1094 | /// IP6 Encap Sec. Payload |
| | 1095 | pub const IPPROTO_ESP = 50; |
| | 1096 | |
| | 1097 | /// IP6 Auth Header |
| | 1098 | pub const IPPROTO_AH = 51; |
| | 1099 | |
| | 1100 | /// Integ. Net Layer Security |
| | 1101 | pub const IPPROTO_INLSP = 52; |
| | 1102 | |
| | 1103 | /// IP with encryption |
| | 1104 | pub const IPPROTO_SWIPE = 53; |
| | 1105 | |
| | 1106 | /// Next Hop Resolution |
| | 1107 | pub const IPPROTO_NHRP = 54; |
| | 1108 | |
| | 1109 | /// IP Mobility |
| | 1110 | pub const IPPROTO_MOBILE = 55; |
| | 1111 | |
| | 1112 | /// Transport Layer Security |
| | 1113 | pub const IPPROTO_TLSP = 56; |
| | 1114 | |
| | 1115 | /// SKIP |
| | 1116 | pub const IPPROTO_SKIP = 57; |
| | 1117 | |
| | 1118 | /// ICMP6 |
| | 1119 | pub const IPPROTO_ICMPV6 = 58; |
| | 1120 | |
| | 1121 | /// IP6 no next header |
| | 1122 | pub const IPPROTO_NONE = 59; |
| | 1123 | |
| | 1124 | /// IP6 destination option |
| | 1125 | pub const IPPROTO_DSTOPTS = 60; |
| | 1126 | |
| | 1127 | /// any host internal protocol |
| | 1128 | pub const IPPROTO_AHIP = 61; |
| | 1129 | |
| | 1130 | /// CFTP |
| | 1131 | pub const IPPROTO_CFTP = 62; |
| | 1132 | |
| | 1133 | /// "hello" routing protocol |
| | 1134 | pub const IPPROTO_HELLO = 63; |
| | 1135 | |
| | 1136 | /// SATNET/Backroom EXPAK |
| | 1137 | pub const IPPROTO_SATEXPAK = 64; |
| | 1138 | |
| | 1139 | /// Kryptolan |
| | 1140 | pub const IPPROTO_KRYPTOLAN = 65; |
| | 1141 | |
| | 1142 | /// Remote Virtual Disk |
| | 1143 | pub const IPPROTO_RVD = 66; |
| | 1144 | |
| | 1145 | /// Pluribus Packet Core |
| | 1146 | pub const IPPROTO_IPPC = 67; |
| | 1147 | |
| | 1148 | /// Any distributed FS |
| | 1149 | pub const IPPROTO_ADFS = 68; |
| | 1150 | |
| | 1151 | /// Satnet Monitoring |
| | 1152 | pub const IPPROTO_SATMON = 69; |
| | 1153 | |
| | 1154 | /// VISA Protocol |
| | 1155 | pub const IPPROTO_VISA = 70; |
| | 1156 | |
| | 1157 | /// Packet Core Utility |
| | 1158 | pub const IPPROTO_IPCV = 71; |
| | 1159 | |
| | 1160 | /// Comp. Prot. Net. Executive |
| | 1161 | pub const IPPROTO_CPNX = 72; |
| | 1162 | |
| | 1163 | /// Comp. Prot. HeartBeat |
| | 1164 | pub const IPPROTO_CPHB = 73; |
| | 1165 | |
| | 1166 | /// Wang Span Network |
| | 1167 | pub const IPPROTO_WSN = 74; |
| | 1168 | |
| | 1169 | /// Packet Video Protocol |
| | 1170 | pub const IPPROTO_PVP = 75; |
| | 1171 | |
| | 1172 | /// BackRoom SATNET Monitoring |
| | 1173 | pub const IPPROTO_BRSATMON = 76; |
| | 1174 | |
| | 1175 | /// Sun net disk proto (temp.) |
| | 1176 | pub const IPPROTO_ND = 77; |
| | 1177 | |
| | 1178 | /// WIDEBAND Monitoring |
| | 1179 | pub const IPPROTO_WBMON = 78; |
| | 1180 | |
| | 1181 | /// WIDEBAND EXPAK |
| | 1182 | pub const IPPROTO_WBEXPAK = 79; |
| | 1183 | |
| | 1184 | /// ISO cnlp |
| | 1185 | pub const IPPROTO_EON = 80; |
| | 1186 | |
| | 1187 | /// VMTP |
| | 1188 | pub const IPPROTO_VMTP = 81; |
| | 1189 | |
| | 1190 | /// Secure VMTP |
| | 1191 | pub const IPPROTO_SVMTP = 82; |
| | 1192 | |
| | 1193 | /// Banyon VINES |
| | 1194 | pub const IPPROTO_VINES = 83; |
| | 1195 | |
| | 1196 | /// TTP |
| | 1197 | pub const IPPROTO_TTP = 84; |
| | 1198 | |
| | 1199 | /// NSFNET-IGP |
| | 1200 | pub const IPPROTO_IGP = 85; |
| | 1201 | |
| | 1202 | /// dissimilar gateway prot. |
| | 1203 | pub const IPPROTO_DGP = 86; |
| | 1204 | |
| | 1205 | /// TCF |
| | 1206 | pub const IPPROTO_TCF = 87; |
| | 1207 | |
| | 1208 | /// Cisco/GXS IGRP |
| | 1209 | pub const IPPROTO_IGRP = 88; |
| | 1210 | |
| | 1211 | /// OSPFIGP |
| | 1212 | pub const IPPROTO_OSPFIGP = 89; |
| | 1213 | |
| | 1214 | /// Strite RPC protocol |
| | 1215 | pub const IPPROTO_SRPC = 90; |
| | 1216 | |
| | 1217 | /// Locus Address Resoloution |
| | 1218 | pub const IPPROTO_LARP = 91; |
| | 1219 | |
| | 1220 | /// Multicast Transport |
| | 1221 | pub const IPPROTO_MTP = 92; |
| | 1222 | |
| | 1223 | /// AX.25 Frames |
| | 1224 | pub const IPPROTO_AX25 = 93; |
| | 1225 | |
| | 1226 | /// IP encapsulated in IP |
| | 1227 | pub const IPPROTO_IPEIP = 94; |
| | 1228 | |
| | 1229 | /// Mobile Int.ing control |
| | 1230 | pub const IPPROTO_MICP = 95; |
| | 1231 | |
| | 1232 | /// Semaphore Comm. security |
| | 1233 | pub const IPPROTO_SCCSP = 96; |
| | 1234 | |
| | 1235 | /// Ethernet IP encapsulation |
| | 1236 | pub const IPPROTO_ETHERIP = 97; |
| | 1237 | |
| | 1238 | /// encapsulation header |
| | 1239 | pub const IPPROTO_ENCAP = 98; |
| | 1240 | |
| | 1241 | /// any private encr. scheme |
| | 1242 | pub const IPPROTO_APES = 99; |
| | 1243 | |
| | 1244 | /// GMTP |
| | 1245 | pub const IPPROTO_GMTP = 100; |
| | 1246 | |
| | 1247 | /// payload compression (IPComp) |
| | 1248 | pub const IPPROTO_IPCOMP = 108; |
| | 1249 | |
| | 1250 | /// SCTP |
| | 1251 | pub const IPPROTO_SCTP = 132; |
| | 1252 | |
| | 1253 | /// IPv6 Mobility Header |
| | 1254 | pub const IPPROTO_MH = 135; |
| | 1255 | |
| | 1256 | /// UDP-Lite |
| | 1257 | pub const IPPROTO_UDPLITE = 136; |
| | 1258 | |
| | 1259 | /// IP6 Host Identity Protocol |
| | 1260 | pub const IPPROTO_HIP = 139; |
| | 1261 | |
| | 1262 | /// IP6 Shim6 Protocol |
| | 1263 | pub const IPPROTO_SHIM6 = 140; |
| | 1264 | |
| | 1265 | /// Protocol Independent Mcast |
| | 1266 | pub const IPPROTO_PIM = 103; |
| | 1267 | |
| | 1268 | /// CARP |
| | 1269 | pub const IPPROTO_CARP = 112; |
| | 1270 | |
| | 1271 | /// PGM |
| | 1272 | pub const IPPROTO_PGM = 113; |
| | 1273 | |
| | 1274 | /// MPLS-in-IP |
| | 1275 | pub const IPPROTO_MPLS = 137; |
| | 1276 | |
| | 1277 | /// PFSYNC |
| | 1278 | pub const IPPROTO_PFSYNC = 240; |
| | 1279 | |
| | 1280 | /// Reserved |
| | 1281 | pub const IPPROTO_RESERVED_253 = 253; |
| | 1282 | |
| | 1283 | /// Reserved |
| | 1284 | pub const IPPROTO_RESERVED_254 = 254; |