1157 socklen_t vallen);
1158 extern int inet6_opt_next(void *extbuf, socklen_t extlen, int offset,
1159 uint8_t *typep, socklen_t *lenp, void **databufp);
1160 extern int inet6_opt_find(void *extbufp, socklen_t extlen, int offset,
1161 uint8_t type, socklen_t *lenp, void **databufp);
1162 extern int inet6_opt_get_val(void *databuf, int offset, void *val,
1163 socklen_t vallen);
1164 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
1165
1166 /*
1167 * Argument structure for IP_ADD_PROXY_ADDR.
1168 * Note that this is an unstable, experimental interface. It may change
1169 * later. Don't use it unless you know what it is.
1170 */
1171 typedef struct {
1172 struct in_addr in_prefix_addr;
1173 unsigned int in_prefix_len;
1174 } in_prefix_t;
1175
1176
1177 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
1178 /*
1179 * IPv6 options
1180 */
1181 #define IPV6_UNICAST_HOPS 0x5 /* hop limit value for unicast */
1182 /* packets. */
1183 /* argument type: uint_t */
1184 #define IPV6_MULTICAST_IF 0x6 /* outgoing interface for */
1185 /* multicast packets. */
1186 /* argument type: struct in6_addr */
1187 #define IPV6_MULTICAST_HOPS 0x7 /* hop limit value to use for */
1188 /* multicast packets. */
1189 /* argument type: uint_t */
1190 #define IPV6_MULTICAST_LOOP 0x8 /* enable/disable delivery of */
1191 /* multicast packets on same socket. */
1192 /* argument type: uint_t */
1193 #define IPV6_JOIN_GROUP 0x9 /* join an IPv6 multicast group. */
1194 /* argument type: struct ipv6_mreq */
1195 #define IPV6_LEAVE_GROUP 0xa /* leave an IPv6 multicast group */
1196 /* argument type: struct ipv6_mreq */
1197 /*
1198 * IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP are being kept
1199 * for backward compatibility. They have the same meaning as IPV6_JOIN_GROUP
1200 * and IPV6_LEAVE_GROUP respectively.
1201 */
1202 #define IPV6_ADD_MEMBERSHIP 0x9 /* join an IPv6 multicast group. */
1203 /* argument type: struct ipv6_mreq */
1204 #define IPV6_DROP_MEMBERSHIP 0xa /* leave an IPv6 multicast group */
1205 /* argument type: struct ipv6_mreq */
1206
1207 #define IPV6_PKTINFO 0xb /* addr plus interface index */
1208 /* arg type: "struct in6_pktingo" - */
1209 #define IPV6_HOPLIMIT 0xc /* hoplimit for datagram */
1210 #define IPV6_NEXTHOP 0xd /* next hop address */
1211 #define IPV6_HOPOPTS 0xe /* hop by hop options */
1212 #define IPV6_DSTOPTS 0xf /* destination options - after */
1213 /* the routing header */
1214 #define IPV6_RTHDR 0x10 /* routing header */
1215 #define IPV6_RTHDRDSTOPTS 0x11 /* destination options - before */
1216 /* the routing header */
1217 #define IPV6_RECVPKTINFO 0x12 /* enable/disable IPV6_PKTINFO */
1272 #define IPV6_PREFER_SRC_TMPDEFAULT IPV6_PREFER_SRC_PUBLIC
1273 #define IPV6_PREFER_SRC_CGAMASK (IPV6_PREFER_SRC_NONCGA | IPV6_PREFER_SRC_CGA)
1274 #define IPV6_PREFER_SRC_CGADEFAULT IPV6_PREFER_SRC_NONCGA
1275
1276 #define IPV6_PREFER_SRC_MASK (IPV6_PREFER_SRC_MIPMASK |\
1277 IPV6_PREFER_SRC_TMPMASK | IPV6_PREFER_SRC_CGAMASK)
1278
1279 #define IPV6_PREFER_SRC_DEFAULT (IPV6_PREFER_SRC_MIPDEFAULT |\
1280 IPV6_PREFER_SRC_TMPDEFAULT | IPV6_PREFER_SRC_CGADEFAULT)
1281
1282 /*
1283 * SunOS private (potentially not portable) IPV6_ option names
1284 */
1285 #define IPV6_BOUND_IF 0x41 /* bind to an ifindex */
1286 #define IPV6_UNSPEC_SRC 0x42 /* source of packets set to */
1287 /* unspecified (all zeros) */
1288
1289 /*
1290 * Miscellaneous IPv6 constants.
1291 */
1292 #define INET_ADDRSTRLEN 16 /* max len IPv4 addr in ascii dotted */
1293 /* decimal notation. */
1294 #define INET6_ADDRSTRLEN 46 /* max len of IPv6 addr in ascii */
1295 /* standard colon-hex notation. */
1296 #define IPV6_PAD1_OPT 0 /* pad byte in IPv6 extension hdrs */
1297
1298 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
1299
1300 /*
1301 * Extern declarations for pre-defined global const variables
1302 */
1303 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
1304 #ifndef _KERNEL
1305 #ifdef __STDC__
1306 extern const struct in6_addr in6addr_any;
1307 extern const struct in6_addr in6addr_loopback;
1308 #else
1309 extern struct in6_addr in6addr_any;
1310 extern struct in6_addr in6addr_loopback;
1311 #endif
1312 #endif
1313 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
1314
1315 #ifdef __cplusplus
1316 }
1317 #endif
1318
1319 #endif /* _NETINET_IN_H */
|
1157 socklen_t vallen);
1158 extern int inet6_opt_next(void *extbuf, socklen_t extlen, int offset,
1159 uint8_t *typep, socklen_t *lenp, void **databufp);
1160 extern int inet6_opt_find(void *extbufp, socklen_t extlen, int offset,
1161 uint8_t type, socklen_t *lenp, void **databufp);
1162 extern int inet6_opt_get_val(void *databuf, int offset, void *val,
1163 socklen_t vallen);
1164 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
1165
1166 /*
1167 * Argument structure for IP_ADD_PROXY_ADDR.
1168 * Note that this is an unstable, experimental interface. It may change
1169 * later. Don't use it unless you know what it is.
1170 */
1171 typedef struct {
1172 struct in_addr in_prefix_addr;
1173 unsigned int in_prefix_len;
1174 } in_prefix_t;
1175
1176
1177 #if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__)
1178 /*
1179 * IPv6 options
1180 */
1181 #define IPV6_UNICAST_HOPS 0x5 /* hop limit value for unicast */
1182 /* packets. */
1183 /* argument type: uint_t */
1184 #define IPV6_MULTICAST_IF 0x6 /* outgoing interface for */
1185 /* multicast packets. */
1186 /* argument type: struct in6_addr */
1187 #define IPV6_MULTICAST_HOPS 0x7 /* hop limit value to use for */
1188 /* multicast packets. */
1189 /* argument type: uint_t */
1190 #define IPV6_MULTICAST_LOOP 0x8 /* enable/disable delivery of */
1191 /* multicast packets on same socket. */
1192 /* argument type: uint_t */
1193 #define IPV6_JOIN_GROUP 0x9 /* join an IPv6 multicast group. */
1194 /* argument type: struct ipv6_mreq */
1195 #define IPV6_LEAVE_GROUP 0xa /* leave an IPv6 multicast group */
1196 /* argument type: struct ipv6_mreq */
1197
1198 /*
1199 * Other XPG6 constants.
1200 */
1201 #define INET_ADDRSTRLEN 16 /* max len IPv4 addr in ascii dotted */
1202 /* decimal notation. */
1203 #define INET6_ADDRSTRLEN 46 /* max len of IPv6 addr in ascii */
1204 /* standard colon-hex notation. */
1205
1206 #endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */
1207
1208 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
1209
1210 /*
1211 * IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP are being kept
1212 * for backward compatibility. They have the same meaning as IPV6_JOIN_GROUP
1213 * and IPV6_LEAVE_GROUP respectively.
1214 */
1215 #define IPV6_ADD_MEMBERSHIP 0x9 /* join an IPv6 multicast group. */
1216 /* argument type: struct ipv6_mreq */
1217 #define IPV6_DROP_MEMBERSHIP 0xa /* leave an IPv6 multicast group */
1218 /* argument type: struct ipv6_mreq */
1219
1220 #define IPV6_PKTINFO 0xb /* addr plus interface index */
1221 /* arg type: "struct in6_pktingo" - */
1222 #define IPV6_HOPLIMIT 0xc /* hoplimit for datagram */
1223 #define IPV6_NEXTHOP 0xd /* next hop address */
1224 #define IPV6_HOPOPTS 0xe /* hop by hop options */
1225 #define IPV6_DSTOPTS 0xf /* destination options - after */
1226 /* the routing header */
1227 #define IPV6_RTHDR 0x10 /* routing header */
1228 #define IPV6_RTHDRDSTOPTS 0x11 /* destination options - before */
1229 /* the routing header */
1230 #define IPV6_RECVPKTINFO 0x12 /* enable/disable IPV6_PKTINFO */
1285 #define IPV6_PREFER_SRC_TMPDEFAULT IPV6_PREFER_SRC_PUBLIC
1286 #define IPV6_PREFER_SRC_CGAMASK (IPV6_PREFER_SRC_NONCGA | IPV6_PREFER_SRC_CGA)
1287 #define IPV6_PREFER_SRC_CGADEFAULT IPV6_PREFER_SRC_NONCGA
1288
1289 #define IPV6_PREFER_SRC_MASK (IPV6_PREFER_SRC_MIPMASK |\
1290 IPV6_PREFER_SRC_TMPMASK | IPV6_PREFER_SRC_CGAMASK)
1291
1292 #define IPV6_PREFER_SRC_DEFAULT (IPV6_PREFER_SRC_MIPDEFAULT |\
1293 IPV6_PREFER_SRC_TMPDEFAULT | IPV6_PREFER_SRC_CGADEFAULT)
1294
1295 /*
1296 * SunOS private (potentially not portable) IPV6_ option names
1297 */
1298 #define IPV6_BOUND_IF 0x41 /* bind to an ifindex */
1299 #define IPV6_UNSPEC_SRC 0x42 /* source of packets set to */
1300 /* unspecified (all zeros) */
1301
1302 /*
1303 * Miscellaneous IPv6 constants.
1304 */
1305 #define IPV6_PAD1_OPT 0 /* pad byte in IPv6 extension hdrs */
1306
1307 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
1308
1309 /*
1310 * Extern declarations for pre-defined global const variables
1311 */
1312 #if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__)
1313 #ifndef _KERNEL
1314 #ifdef __STDC__
1315 extern const struct in6_addr in6addr_any;
1316 extern const struct in6_addr in6addr_loopback;
1317 #else
1318 extern struct in6_addr in6addr_any;
1319 extern struct in6_addr in6addr_loopback;
1320 #endif
1321 #endif
1322 #endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */
1323
1324 #ifdef __cplusplus
1325 }
1326 #endif
1327
1328 #endif /* _NETINET_IN_H */
|