1 #ifndef _INET_PROTO_INFO_H_INCLUDED_ 2 #define _INET_PROTO_INFO_H_INCLUDED_ 3 4 /*++ 5 /* NAME 6 /* inet_proto_info 3h 7 /* SUMMARY 8 /* convert protocol names to assorted constants 9 /* SYNOPSIS 10 /* #include <inet_proto_info.h> 11 DESCRIPTION 12 .nf 13 14 /* 15 * External interface. 16 */ 17 typedef struct { 18 unsigned int ai_family; /* PF_UNSPEC, PF_INET, or PF_INET6 */ 19 unsigned int *ai_family_list; /* PF_INET and/or PF_INET6 */ 20 unsigned int *dns_atype_list; /* TAAAA and/or TA */ 21 unsigned char *sa_family_list; /* AF_INET6 and/or AF_INET */ 22 } INET_PROTO_INFO; 23 24 /* 25 * Some compilers won't link initialized data unless we call a function in 26 * the same source file. Therefore, inet_proto_info() is a function instead 27 * of a global variable. 28 */ 29 #define inet_proto_info() \ 30 (inet_proto_table ? (const INET_PROTO_INFO*) inet_proto_table : \ 31 inet_proto_init("default protocol setting", DEF_INET_PROTOCOLS)) 32 33 extern const INET_PROTO_INFO *inet_proto_init(const char *, const char *); 34 extern INET_PROTO_INFO *inet_proto_table; 35 36 #define INET_PROTO_NAME_IPV6 "ipv6" 37 #define INET_PROTO_NAME_IPV4 "ipv4" 38 #define INET_PROTO_NAME_ALL "all" 39 40 /* LICENSE 41 /* .ad 42 /* .fi 43 /* The Secure Mailer license must be distributed with this software. 44 /* AUTHOR(S) 45 /* Wietse Venema 46 /* IBM T.J. Watson Research 47 /* P.O. Box 704 48 /* Yorktown Heights, NY 10598, USA 49 /* 50 /* Wietse Venema 51 /* Google, Inc. 52 /* 111 8th Avenue 53 /* New York, NY 10011, USA 54 /*--*/ 55 56 #endif 57