/* CMS REPLACEMENT HISTORY, Element INET.H */ /* *3D1 11-DEC-2000 17:38:13 MYTH "V51 baselevel code freeze" */ /* 3C1 12-MAY-2000 00:51:38 MUGGERIDGE "V51IFT baselevel code freeze" */ /* 3B1 28-OCT-1998 19:51:23 MUGGERIDGE "V50SSB baselevel code freeze" */ /* 3A1 22-OCT-1998 18:18:39 MUGGERIDGE "V50SSB baselevel code freeze" */ /* *3 3-AUG-1998 17:00:06 GEMIGNANI "Change inet_makeaddr() to revert back to its old declaration" */ /* 2A1 18-JUN-1998 05:36:44 MUGGERIDGE "V50IFT baselevel code freeze" */ /* *2 4-FEB-1998 17:46:31 GEMIGNANI "Fix inclusions" */ /* *1 19-JAN-1998 15:24:31 GEMIGNANI "Initial population of IPv6 source" */ /* CMS REPLACEMENT HISTORY, Element INET.H */ #ifndef __INET_LOADED #define __INET_LOADED 1 /**************************************************************************** ** ** - Internet access ** ***************************************************************************** ** Header introduced by the X/Open CAE Specification, Issue 4, Version 2 ***************************************************************************** ** ** Copyright Digital Equipment Corporation 1993, 1995. All rights reserved. ** ** Restricted Rights: Use, duplication, or disclosure by the U.S. ** Government is subject to restrictions as set forth in subparagraph ** (c) (1) (ii) of DFARS 252.227-7013, or in FAR 52.227-19, or in FAR ** 52.227-14 Alt. III, as applicable. ** ** This software is proprietary to and embodies the confidential ** technology of Digital Equipment Corporation. Possession, use, or ** copying of this software and media is authorized only pursuant to a ** valid written license from Digital or an authorized sublicensor. ** ****************************************************************************** */ #ifdef OBSOLETE #include //OBSOLETE #if (!defined(BSD)) || (BSD < 199306) # include //OBSOLETE #else # include //OBSOLETE #endif #include //OBSOLETE #endif /* OBSOLETE */ #include #pragma __nostandard #ifdef __cplusplus extern "C" { #endif #ifndef __CRTL_VER # define __CRTL_VER __VMS_VER #endif /* ** Ensure that regardless of user /pointer_size usage, we begin processing ** using a 32 bit pointer context. */ #if __INITIAL_POINTER_SIZE # if (__CRTL_VER < 70000000) || !defined __ALPHA # error " Pointer size usage not permitted before OpenVMS Alpha V7.0" # endif # pragma __pointer_size __save # pragma __pointer_size 32 #endif /* ** All structures should be member aligned on natural boundaries */ #pragma __member_alignment __save #pragma __member_alignment /* ** Define XPG4 IP typedefs */ #ifndef ____IN_PORT_T # define ____IN_PORT_T 1 typedef unsigned short __in_port_t; #endif #ifndef ____IN_ADDR_T # define ____IN_ADDR_T 1 typedef unsigned int __in_addr_t; #endif #if !defined __IN_PORT_T && !defined _DECC_V4_SOURCE # define __IN_PORT_T 1 typedef __in_port_t in_port_t; #endif #if !defined __IN_ADDR_T && !defined _DECC_V4_SOURCE # define __IN_ADDR_T 1 typedef __in_addr_t in_addr_t; #endif /* ** Internet address (a structure for historical reasons) */ #ifndef __IN_ADDR # define __IN_ADDR 1 struct in_addr { union { struct { unsigned char s_b1,s_b2,s_b3,s_b4; } S_un_b; struct { unsigned short s_w1,s_w2; } S_un_w; unsigned long S_addr; #ifdef _XOPEN_SOURCE __in_addr_t S_addr_xopen; #endif } S_un; }; #ifdef _XOPEN_SOURCE # define s_addr S_un.S_addr_xopen /* X/Open version of s_addr */ #else # define s_addr S_un.S_addr /* can be used for most tcp & ip code */ #endif # define s_host S_un.S_un_b.s_b2 /* host on imp */ # define s_net S_un.S_un_b.s_b1 /* network */ # define s_imp S_un.S_un_w.s_w2 /* imp */ # define s_impno S_un.S_un_b.s_b4 /* imp # */ # define s_lh S_un.S_un_b.s_b3 /* logical host */ #endif /* ** The following function always returns a 32 bit pointer */ char *inet_ntoa (struct in_addr __in); /* ** All other functions accept 32 bit or 64 bit pointers. */ #if __INITIAL_POINTER_SIZE #pragma __pointer_size 64 #endif __in_addr_t htonl (__in_addr_t __hostlong); __in_port_t htons (__in_port_t __hostshort); __in_addr_t ntohl (__in_addr_t __netlong); __in_port_t ntohs (__in_port_t __netshort); __in_addr_t inet_addr (const char *__cp); __in_addr_t inet_network (const char *__cp); __in_addr_t inet_lnaof (struct in_addr __in); __in_addr_t inet_netof (struct in_addr __in); struct in_addr inet_makeaddr (__in_addr_t __net, __in_addr_t __lna); __in_addr_t inet_addr (const char *); int inet_aton (const char *, struct in_addr *); __in_addr_t inet_lnaof (struct in_addr); char * inet_neta (u_long, char *, size_t); __in_addr_t inet_netof (struct in_addr); __in_addr_t inet_network (const char *); char *inet_net_ntop (int, const void *, int, char *, size_t); int inet_net_pton (int, const char *, void *, size_t); char *inet_ntoa (struct in_addr); int inet_pton (int, const char *, void *); char *inet_ntop (int, const void *, char *, size_t); u_int inet_nsap_addr (const char *, u_char *, int); char *inet_nsap_ntoa (int, const u_char *, char *); /* ** Restore the users pointer context */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size __restore #endif #ifdef __cplusplus } #endif #pragma __member_alignment __restore #pragma __standard #endif /* __INET_LOADED */