#ifndef __IFADDRS_LOADED #define __IFADDRS_LOADED /**************************************************************************** ** ** - declarations for getting network interface addresses ** ***************************************************************************** ** * ** VMS SOFTWARE, INC. CONFIDENTIAL. This software is confidential * ** proprietary software licensed by VMS Software, Inc., and is not * ** authorized to be used, duplicated or disclosed to anyone without * ** the prior written permission of VMS Software, Inc. * ** Copyright 2020-2022 VMS Software, Inc. * ** * ****************************************************************************/ #pragma __nostandard #if __CRTL_VER >= 80500000 && !defined _ANSI_C_SOURCE #ifdef __cplusplus extern "C" { #endif #if __INITIAL_POINTER_SIZE # pragma __pointer_size __save #endif #pragma __member_alignment __save #pragma __member_alignment /* Use this macro in all ifaddrs structure definitions */ #define __IFADDRS_MEMBERS \ char *ifa_name; /* Interface name */ \ unsigned int ifa_flags; /* Interface flags */ \ struct sockaddr *ifa_addr; /* Interface address */ \ struct sockaddr *ifa_netmask; /* Interface netmask */ \ struct sockaddr *ifa_dstaddr; /* P2P interface destination */ \ void *ifa_data; /* Address specific data */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size 32 struct __ifaddrs32 { struct __ifaddrs32 *ifa_next; /* Pointer to next struct */ __IFADDRS_MEMBERS }; # pragma __pointer_size 64 struct __ifaddrs64 { struct __ifaddrs64 *ifa_next; /* Pointer to next struct */ __IFADDRS_MEMBERS }; # if __INITIAL_POINTER_SIZE == 32 # define ifaddrs __ifaddrs32 # else # define ifaddrs __ifaddrs64 # endif #else struct ifaddrs { struct ifaddrs *ifa_next; /* Pointer to next struct */ __IFADDRS_MEMBERS }; #endif /* /POINTER used */ #ifndef ifa_broadaddr #define ifa_broadaddr ifa_dstaddr /* broadcast address interface */ #endif #pragma __member_alignment __restore #if __INITIAL_POINTER_SIZE == 32 # pragma __pointer_size 32 #endif int getifaddrs(struct ifaddrs **); #if __INITIAL_POINTER_SIZE /* These pointer specific functions require /POINTER to be visible */ # pragma __pointer_size 32 int _getifaddrs32(struct __ifaddrs32 **); # pragma __pointer_size 64 int _getifaddrs64(struct __ifaddrs64 **); #endif /* /POINTER_SIZE check */ void free(void *__ptr); #define freeifaddrs(PTR) free((PTR)) /* ** Restore the users pointer context */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size __restore #endif #ifdef __cplusplus } #endif #endif /* __CRTL_VER >= 80500000 */ #pragma __standard #endif /* __IFADDRS_LOADED */