#line 1 "./rawsock.c"
/*
 * Module for Raw Sockets / CLISP
 * Fred Cohen, 2003-2004
 * Don Cohen, 2003-2004
 * Sam Steingold 2004-2010
 * Bruno Haible 2004-2008
 * <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html>
 */

#include "clisp.h"

#include "config.h"

#if defined(HAVE_SYS_TIME_H)
# include <sys/time.h>
#endif
#if defined(HAVE_TIME_H)
# include <time.h>
#endif
#if defined(HAVE_SYS_TYPES_H)
# include <sys/types.h>
#endif
#include <stdio.h>
#if defined(HAVE_UNISTD_H)
# include <unistd.h>
#endif
#include <string.h>            /* for memcpy(3) */
#include <stddef.h>            /* for offsetof */
#if defined(HAVE_SYS_SOCKET_H)
# include <sys/socket.h>
#endif
#if defined(HAVE_NETINET_IN_H)
# include <netinet/in.h>
#endif
#if defined(HAVE_ARPA_INET_H)
# include <arpa/inet.h>
#endif
#if defined(HAVE_LINUX_IF_PACKET_H)
# include <linux/if_packet.h>
#endif
#if defined(HAVE_ASM_TYPES_H)
# include <asm/types.h>
#endif
#if defined(HAVE_LINUX_NETLINK_H)
# include <linux/netlink.h>
#endif
#if defined(HAVE_NET_IF_H)
# include <net/if.h>
#endif
#if defined(HAVE_NETINET_IF_ETHER_H)
# include <netinet/if_ether.h>
#endif
#if defined(HAVE_SYS_IOCTL_H)
# include <sys/ioctl.h>
#endif
#if defined(HAVE_SYS_UN_H)
# include <sys/un.h>
#endif
#if defined(HAVE_ERRNO_H)
# include <errno.h>
#endif
#if defined(HAVE_STROPS_H)
# include <stropts.h>
#endif
#if defined(HAVE_POLL_H)
# include <poll.h>
#endif
#if defined(HAVE_WINSOCK2_H) /* woe32 suckety sucks */
# include <winsock2.h>
# include <ws2tcpip.h>
# define SETSOCKOPT_ARG_T char*
# define CLOSESOCK  closesocket
# define READ(s,b,l)  recv(s,b,l,0)
# define WRITE(s,b,l)  send(s,b,l,0)
#else
# define CLOSESOCK  close
# define READ  read
# define WRITE  write
#endif
#if defined(HAVE_WS2TCPIP_H)
# include <ws2tcpip.h>
#endif
#if defined(HAVE_NETDB_H)
# include <netdb.h>
#endif
#if defined(HAVE_SYS_UIO_H)
# include <sys/uio.h>
#endif
#if defined(HAVE_IFADDRS_H)
# include <ifaddrs.h>
#endif
typedef SOCKET rawsock_t;

DEFMODULE(rawsock,"RAWSOCK")

#define O(varname) module__rawsock__object_tab._##varname
#define F(varname) subr_tab_ptr_as_object(&(module__rawsock__subr_tab._##varname))

struct module__rawsock__object_tab_t {
#if defined(AF_12844)
  gcv_object_t _object_K12844;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_ACCEPTCONN))
  gcv_object_t _object_Kacceptconn;
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  gcv_object_t _object_Kaddrconfig;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_ADDRFAMILY))
  gcv_object_t _object_Kaddrfamily;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_AGAIN))
  gcv_object_t _object_Kagain;
#endif
#if ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)) || (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE))
  gcv_object_t _object_Kall;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_ALLMULTI))
  gcv_object_t _object_Kallmulti;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_ALTPHYS))
  gcv_object_t _object_Kaltphys;
#endif
#if defined(AF_APPLETALK)
  gcv_object_t _object_Kappletalk;
#endif
#if defined(AF_ASH)
  gcv_object_t _object_Kash;
#endif
#if defined(AF_ATM)
  gcv_object_t _object_Katm;
#endif
#if defined(AF_ATMPVC)
  gcv_object_t _object_Katmpvc;
#endif
#if defined(AF_ATMSVC)
  gcv_object_t _object_Katmsvc;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_AUTOMEDIA))
  gcv_object_t _object_Kautomedia;
#endif
#if defined(AF_AX25)
  gcv_object_t _object_Kax25;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_BADFLAGS))
  gcv_object_t _object_Kbadflags;
#endif
#if defined(AF_BAN)
  gcv_object_t _object_Kban;
#endif
#if defined(AF_BLUETOOTH)
  gcv_object_t _object_Kbluetooth;
#endif
#if defined(AF_BRIDGE)
  gcv_object_t _object_Kbridge;
#endif
#if ((defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_BROADCAST))) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_BROADCAST)))
  gcv_object_t _object_Kbroadcast;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_CANCELED))
  gcv_object_t _object_Kcanceled;
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  gcv_object_t _object_Kcanonname;
#endif
#if defined(AF_CCITT)
  gcv_object_t _object_Kccitt;
#endif
#if defined(AF_CHAOS)
  gcv_object_t _object_Kchaos;
#endif
#if defined(AF_CLUSTER)
  gcv_object_t _object_Kcluster;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_CONFIRM))
  gcv_object_t _object_Kconfirm;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_CTRUNC))
  gcv_object_t _object_Kctrunc;
#endif
  gcv_object_t _object_Kdata;
#if defined(AF_DATAKIT)
  gcv_object_t _object_Kdatakit;
#endif
#if ((defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_DEBUG))) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_DEBUG)))
  gcv_object_t _object_Kdebug;
#endif
#if defined(AF_DECnet)
  gcv_object_t _object_Kdecnet;
#endif
#if (defined(SOCK_DGRAM)) || (defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE))
  gcv_object_t _object_Kdgram;
#endif
#if defined(AF_DLI)
  gcv_object_t _object_Kdli;
#endif
#if ((defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_DONTROUTE))) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_DONTROUTE)))
  gcv_object_t _object_Kdontroute;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_DONTWAIT))
  gcv_object_t _object_Kdontwait;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_DORMANT))
  gcv_object_t _object_Kdormant;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_DYNAMIC))
  gcv_object_t _object_Kdynamic;
#endif
#if defined(AF_ECMA)
  gcv_object_t _object_Kecma;
#endif
#if defined(AF_ECONET)
  gcv_object_t _object_Keconet;
#endif
  gcv_object_t _object_Kend;
  gcv_object_t _object_Keor;
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_ERROR))
  gcv_object_t _object_Kerror;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_ERRQUEUE))
  gcv_object_t _object_Kerrqueue;
#endif
#if defined(ETH_P_802_2)
  gcv_object_t _object_Keth_p_802_2;
#endif
#if defined(ETH_P_802_3)
  gcv_object_t _object_Keth_p_802_3;
#endif
#if defined(ETH_P_AARP)
  gcv_object_t _object_Keth_p_aarp;
#endif
#if defined(ETH_P_ALL)
  gcv_object_t _object_Keth_p_all;
#endif
#if defined(ETH_P_ARP)
  gcv_object_t _object_Keth_p_arp;
#endif
#if defined(ETH_P_ATALK)
  gcv_object_t _object_Keth_p_atalk;
#endif
#if defined(ETH_P_ATMFATE)
  gcv_object_t _object_Keth_p_atmfate;
#endif
#if defined(ETH_P_ATMMPOA)
  gcv_object_t _object_Keth_p_atmmpoa;
#endif
#if defined(ETH_P_AX25)
  gcv_object_t _object_Keth_p_ax25;
#endif
#if defined(ETH_P_BPQ)
  gcv_object_t _object_Keth_p_bpq;
#endif
#if defined(ETH_P_CONTROL)
  gcv_object_t _object_Keth_p_control;
#endif
#if defined(ETH_P_CUST)
  gcv_object_t _object_Keth_p_cust;
#endif
#if defined(ETH_P_DDCMP)
  gcv_object_t _object_Keth_p_ddcmp;
#endif
#if defined(ETH_P_DEC)
  gcv_object_t _object_Keth_p_dec;
#endif
#if defined(ETH_P_DIAG)
  gcv_object_t _object_Keth_p_diag;
#endif
#if defined(ETH_P_DNA_DL)
  gcv_object_t _object_Keth_p_dna_dl;
#endif
#if defined(ETH_P_DNA_RC)
  gcv_object_t _object_Keth_p_dna_rc;
#endif
#if defined(ETH_P_DNA_RT)
  gcv_object_t _object_Keth_p_dna_rt;
#endif
#if defined(ETH_P_ECONET)
  gcv_object_t _object_Keth_p_econet;
#endif
#if defined(ETH_P_IEEEPUP)
  gcv_object_t _object_Keth_p_ieeepup;
#endif
#if defined(ETH_P_IEEEPUPAT)
  gcv_object_t _object_Keth_p_ieeepupat;
#endif
#if defined(ETH_P_IP)
  gcv_object_t _object_Keth_p_ip;
#endif
#if defined(ETH_P_IPV6)
  gcv_object_t _object_Keth_p_ipv6;
#endif
#if defined(ETH_P_IPX)
  gcv_object_t _object_Keth_p_ipx;
#endif
#if defined(ETH_P_IRDA)
  gcv_object_t _object_Keth_p_irda;
#endif
#if defined(ETH_P_LAT)
  gcv_object_t _object_Keth_p_lat;
#endif
#if defined(ETH_P_LOCALTALK)
  gcv_object_t _object_Keth_p_localtalk;
#endif
#if defined(ETH_P_LOOP)
  gcv_object_t _object_Keth_p_loop;
#endif
#if defined(ETH_P_MOBITEX)
  gcv_object_t _object_Keth_p_mobitex;
#endif
#if defined(ETH_P_PPPTALK)
  gcv_object_t _object_Keth_p_ppptalk;
#endif
#if defined(ETH_P_PPP_DISC)
  gcv_object_t _object_Keth_p_ppp_disc;
#endif
#if defined(ETH_P_PPP_MP)
  gcv_object_t _object_Keth_p_ppp_mp;
#endif
#if defined(ETH_P_PPP_SES)
  gcv_object_t _object_Keth_p_ppp_ses;
#endif
#if defined(ETH_P_PUP)
  gcv_object_t _object_Keth_p_pup;
#endif
#if defined(ETH_P_PUPAT)
  gcv_object_t _object_Keth_p_pupat;
#endif
#if defined(ETH_P_RARP)
  gcv_object_t _object_Keth_p_rarp;
#endif
#if defined(ETH_P_SCA)
  gcv_object_t _object_Keth_p_sca;
#endif
#if defined(ETH_P_SNAP)
  gcv_object_t _object_Keth_p_snap;
#endif
#if defined(ETH_P_TR_802_2)
  gcv_object_t _object_Keth_p_tr_802_2;
#endif
#if defined(ETH_P_WAN_PPP)
  gcv_object_t _object_Keth_p_wan_ppp;
#endif
#if defined(ETH_P_X25)
  gcv_object_t _object_Keth_p_x25;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_FAIL))
  gcv_object_t _object_Kfail;
#endif
  gcv_object_t _object_Kfamily;
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_FIN))
  gcv_object_t _object_Kfin;
#endif
#if defined(AF_FIREFOX)
  gcv_object_t _object_Kfirefox;
#endif
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
  gcv_object_t _object_Kflags_and;
#endif
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
  gcv_object_t _object_Kflags_or;
#endif
#if defined(AF_HYLINK)
  gcv_object_t _object_Khylink;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_IDN_ENCODE))
  gcv_object_t _object_Kidn_encode;
#endif
#if defined(AF_IMPLINK)
  gcv_object_t _object_Kimplink;
#endif
#if defined(AF_INET)
  gcv_object_t _object_Kinet;
#endif
#if defined(AF_INET6)
  gcv_object_t _object_Kinet6;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_INPROGRESS))
  gcv_object_t _object_Kinprogress;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_INTR))
  gcv_object_t _object_Kintr;
#endif
#if (defined(IPPROTO_AH)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_AH)))
  gcv_object_t _object_Kipproto_ah;
#endif
#if defined(IPPROTO_COMP)
  gcv_object_t _object_Kipproto_comp;
#endif
#if (defined(IPPROTO_DSTOPTS)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_DSTOPTS)))
  gcv_object_t _object_Kipproto_dstopts;
#endif
#if (defined(IPPROTO_EGP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_EGP)))
  gcv_object_t _object_Kipproto_egp;
#endif
#if (defined(IPPROTO_ESP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_ESP)))
  gcv_object_t _object_Kipproto_esp;
#endif
#if (defined(IPPROTO_FRAGMENT)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_FRAGMENT)))
  gcv_object_t _object_Kipproto_fragment;
#endif
#if (defined(IPPROTO_GGP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_GGP)))
  gcv_object_t _object_Kipproto_ggp;
#endif
#if defined(IPPROTO_GRE)
  gcv_object_t _object_Kipproto_gre;
#endif
#if (defined(IPPROTO_HOPOPTS)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_HOPOPTS)))
  gcv_object_t _object_Kipproto_hopopts;
#endif
#if (defined(IPPROTO_ICMP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_ICMP)))
  gcv_object_t _object_Kipproto_icmp;
#endif
#if (defined(IPPROTO_ICMPV6)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_ICMPV6)))
  gcv_object_t _object_Kipproto_icmpv6;
#endif
#if (defined(IPPROTO_IDP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_IDP)))
  gcv_object_t _object_Kipproto_idp;
#endif
#if (defined(IPPROTO_IGMP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_IGMP)))
  gcv_object_t _object_Kipproto_igmp;
#endif
#if (defined(IPPROTO_IP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_IP)))
  gcv_object_t _object_Kipproto_ip;
#endif
#if (defined(IPPROTO_IPIP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_IPIP)))
  gcv_object_t _object_Kipproto_ipip;
#endif
#if (defined(IPPROTO_IPV6)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_IPV6)))
  gcv_object_t _object_Kipproto_ipv6;
#endif
#if (defined(IPPROTO_ND)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_ND)))
  gcv_object_t _object_Kipproto_nd;
#endif
#if (defined(IPPROTO_NONE)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_NONE)))
  gcv_object_t _object_Kipproto_none;
#endif
#if defined(IPPROTO_PIM)
  gcv_object_t _object_Kipproto_pim;
#endif
#if (defined(IPPROTO_PUP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_PUP)))
  gcv_object_t _object_Kipproto_pup;
#endif
#if (defined(IPPROTO_RAW)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_RAW)))
  gcv_object_t _object_Kipproto_raw;
#endif
#if (defined(IPPROTO_ROUTING)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_ROUTING)))
  gcv_object_t _object_Kipproto_routing;
#endif
#if defined(IPPROTO_RSVP)
  gcv_object_t _object_Kipproto_rsvp;
#endif
#if (defined(IPPROTO_TCP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_TCP)))
  gcv_object_t _object_Kipproto_tcp;
#endif
#if (defined(IPPROTO_UDP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_UDP)))
  gcv_object_t _object_Kipproto_udp;
#endif
#if defined(AF_IPX)
  gcv_object_t _object_Kipx;
#endif
#if defined(AF_IRDA)
  gcv_object_t _object_Kirda;
#endif
#if defined(AF_ISO)
  gcv_object_t _object_Kiso;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_KEEPALIVE))
  gcv_object_t _object_Kkeepalive;
#endif
#if defined(AF_KEY)
  gcv_object_t _object_Kkey;
#endif
#if defined(AF_LAT)
  gcv_object_t _object_Klat;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(WIN32_NATIVE)) || (defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE))
  gcv_object_t _object_Klevel;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_LINGER))
  gcv_object_t _object_Klinger;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_LINK0))
  gcv_object_t _object_Klink0;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_LINK1))
  gcv_object_t _object_Klink1;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_LINK2))
  gcv_object_t _object_Klink2;
#endif
#if defined(AF_LOCAL)
  gcv_object_t _object_Klocal;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_LOOPBACK))
  gcv_object_t _object_Kloopback;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_LOWER_UP))
  gcv_object_t _object_Klower_up;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_MASTER))
  gcv_object_t _object_Kmaster;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_MEMORY))
  gcv_object_t _object_Kmemory;
#endif
  gcv_object_t _object_Kmessage;
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_MONITOR))
  gcv_object_t _object_Kmonitor;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_MORE))
  gcv_object_t _object_Kmore;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_MULTICAST))
  gcv_object_t _object_Kmulticast;
#endif
#if defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)
  gcv_object_t _object_Knamereqd;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_NEEDSGIANT))
  gcv_object_t _object_Kneedsgiant;
#endif
#if defined(AF_NETBEUI)
  gcv_object_t _object_Knetbeui;
#endif
#if defined(AF_NETBIOS)
  gcv_object_t _object_Knetbios;
#endif
#if defined(AF_NETDES)
  gcv_object_t _object_Knetdes;
#endif
#if defined(AF_NETLINK)
  gcv_object_t _object_Knetlink;
#endif
#if defined(NETLINK_AUDIT)
  gcv_object_t _object_Knetlink_audit;
#endif
#if defined(NETLINK_CONNECTOR)
  gcv_object_t _object_Knetlink_connector;
#endif
#if defined(NETLINK_DNRTMSG)
  gcv_object_t _object_Knetlink_dnrtmsg;
#endif
#if defined(NETLINK_ECRYPTFS)
  gcv_object_t _object_Knetlink_ecryptfs;
#endif
#if defined(NETLINK_FIB_LOOKUP)
  gcv_object_t _object_Knetlink_fib_lookup;
#endif
#if defined(NETLINK_FIREWALL)
  gcv_object_t _object_Knetlink_firewall;
#endif
#if defined(NETLINK_GENERIC)
  gcv_object_t _object_Knetlink_generic;
#endif
#if defined(NETLINK_INET_DIAG)
  gcv_object_t _object_Knetlink_inet_diag;
#endif
#if defined(NETLINK_IP6_FW)
  gcv_object_t _object_Knetlink_ip6_fw;
#endif
#if defined(NETLINK_ISCSI)
  gcv_object_t _object_Knetlink_iscsi;
#endif
#if defined(NETLINK_KOBJECT_UEVENT)
  gcv_object_t _object_Knetlink_kobject_uevent;
#endif
#if defined(NETLINK_NETFILTER)
  gcv_object_t _object_Knetlink_netfilter;
#endif
#if defined(NETLINK_NFLOG)
  gcv_object_t _object_Knetlink_nflog;
#endif
#if defined(NETLINK_ROUTE)
  gcv_object_t _object_Knetlink_route;
#endif
#if defined(NETLINK_SCSITRANSPORT)
  gcv_object_t _object_Knetlink_scsitransport;
#endif
#if defined(NETLINK_SELINUX)
  gcv_object_t _object_Knetlink_selinux;
#endif
#if defined(NETLINK_USERSOCK)
  gcv_object_t _object_Knetlink_usersock;
#endif
#if defined(NETLINK_XFRM)
  gcv_object_t _object_Knetlink_xfrm;
#endif
#if defined(AF_NETROM)
  gcv_object_t _object_Knetrom;
#endif
#if ((defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_NOARP))) || (defined(HAVE_NET_IF_H))
  gcv_object_t _object_Knoarp;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_NODATA))
  gcv_object_t _object_Knodata;
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  gcv_object_t _object_Knode;
#endif
#if defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)
  gcv_object_t _object_Knofqdn;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_NONAME))
  gcv_object_t _object_Knoname;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_NOSIGNAL))
  gcv_object_t _object_Knosignal;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_NOTCANCELED))
  gcv_object_t _object_Knotcanceled;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_NOTRAILERS))
  gcv_object_t _object_Knotrailers;
#endif
#if defined(AF_NS)
  gcv_object_t _object_Kns;
#endif
#if defined(NSPROTO_IPX)
  gcv_object_t _object_Knsproto_ipx;
#endif
#if defined(NSPROTO_SPX)
  gcv_object_t _object_Knsproto_spx;
#endif
#if defined(NSPROTO_SPXII)
  gcv_object_t _object_Knsproto_spxii;
#endif
#if (defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)) || ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE))
  gcv_object_t _object_Knumerichost;
#endif
#if defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)
  gcv_object_t _object_Knumericscope;
#endif
#if (defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)) || ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE))
  gcv_object_t _object_Knumericserv;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_OACTIVE))
  gcv_object_t _object_Koactive;
#endif
  gcv_object_t _object_Koob;
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_OOBINLINE))
  gcv_object_t _object_Koobinline;
#endif
#if defined(AF_OSI)
  gcv_object_t _object_Kosi;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_OVERFLOW))
  gcv_object_t _object_Koverflow;
#endif
#if (defined(AF_PACKET)) || (defined(SOCK_PACKET))
  gcv_object_t _object_Kpacket;
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  gcv_object_t _object_Kpassive;
#endif
  gcv_object_t _object_Kpeek;
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_PEERCRED))
  gcv_object_t _object_Kpeercred;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_POINTOPOINT))
  gcv_object_t _object_Kpointopoint;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_POLLING))
  gcv_object_t _object_Kpolling;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_PORTSEL))
  gcv_object_t _object_Kportsel;
#endif
#if defined(AF_PPPOX)
  gcv_object_t _object_Kpppox;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_PPROMISC))
  gcv_object_t _object_Kppromisc;
#endif
#if ((defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_PROMISC))) || (defined(HAVE_NET_IF_H))
  gcv_object_t _object_Kpromisc;
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  gcv_object_t _object_Kprotocol;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_PROXY))
  gcv_object_t _object_Kproxy;
#endif
#if defined(AF_PUP)
  gcv_object_t _object_Kpup;
#endif
#if defined(SOCK_RAW)
  gcv_object_t _object_Kraw;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_RCVBUF))
  gcv_object_t _object_Krcvbuf;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_RCVLOWAT))
  gcv_object_t _object_Krcvlowat;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_RCVTIMEO))
  gcv_object_t _object_Krcvtimeo;
#endif
#if defined(SOCK_RDM)
  gcv_object_t _object_Krdm;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_REUSEADDR))
  gcv_object_t _object_Kreuseaddr;
#endif
#if defined(AF_ROSE)
  gcv_object_t _object_Krose;
#endif
#if defined(AF_ROUTE)
  gcv_object_t _object_Kroute;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_RST))
  gcv_object_t _object_Krst;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_RUNNING))
  gcv_object_t _object_Krunning;
#endif
#if defined(AF_SECURITY)
  gcv_object_t _object_Ksecurity;
#endif
#if defined(SOCK_SEQPACKET)
  gcv_object_t _object_Kseqpacket;
#endif
#if ((defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_SERVICE))) || ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE))
  gcv_object_t _object_Kservice;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_SIMPLEX))
  gcv_object_t _object_Ksimplex;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_SLAVE))
  gcv_object_t _object_Kslave;
#endif
#if defined(AF_SNA)
  gcv_object_t _object_Ksna;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_SNDBUF))
  gcv_object_t _object_Ksndbuf;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_SNDLOWAT))
  gcv_object_t _object_Ksndlowat;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_SNDTIMEO))
  gcv_object_t _object_Ksndtimeo;
#endif
  gcv_object_t _object_Ksocket;
#if ((defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_SOCKTYPE))) || ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE))
  gcv_object_t _object_Ksocktype;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_ATALK))
  gcv_object_t _object_Ksol_atalk;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_AX25))
  gcv_object_t _object_Ksol_ax25;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_IP))
  gcv_object_t _object_Ksol_ip;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_IPX))
  gcv_object_t _object_Ksol_ipx;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_NETROM))
  gcv_object_t _object_Ksol_netrom;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_SOCKET))
  gcv_object_t _object_Ksol_socket;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_TCP))
  gcv_object_t _object_Ksol_tcp;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_UDP))
  gcv_object_t _object_Ksol_udp;
#endif
  gcv_object_t _object_Kstart;
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_STATICARP))
  gcv_object_t _object_Kstaticarp;
#endif
#if defined(SOCK_STREAM)
  gcv_object_t _object_Kstream;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_SYN))
  gcv_object_t _object_Ksyn;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_SYSTEM))
  gcv_object_t _object_Ksystem;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_TRUNC))
  gcv_object_t _object_Ktrunc;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_TRYHARD))
  gcv_object_t _object_Ktryhard;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_TYPE))
  gcv_object_t _object_Ktype;
#endif
#if defined(AF_UNIX)
  gcv_object_t _object_Kunix;
#endif
#if defined(AF_UNSPEC)
  gcv_object_t _object_Kunspec;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_UP))
  gcv_object_t _object_Kup;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_USELOOPBACK))
  gcv_object_t _object_Kuseloopback;
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  gcv_object_t _object_Kv4mapped;
#endif
#if defined(AF_VOICEVIEW)
  gcv_object_t _object_Kvoiceview;
#endif
  gcv_object_t _object_Kwaitall;
#if defined(AF_WANPIPE)
  gcv_object_t _object_Kwanpipe;
#endif
#if defined(AF_X25)
  gcv_object_t _object_Kx25;
#endif
  gcv_object_t _object_os__errno;
  gcv_object_t _object_rawsock__eai;
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  gcv_object_t _object_rawsock__make_addrinfo;
#endif
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
  gcv_object_t _object_rawsock__make_ifaddrs;
#endif
#if defined(HAVE_NETDB_H)
  gcv_object_t _object_rawsock__make_network;
#endif
#if defined(HAVE_NETDB_H)
  gcv_object_t _object_rawsock__make_protocol;
#endif
  gcv_object_t _object_rawsock__make_sa;
#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
  gcv_object_t _object_rawsock__message;
#endif
  gcv_object_t _object_rawsock__rawsock_error;
  gcv_object_t _object_rawsock__sockaddr;
#if ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)) && (defined(WIN32_NATIVE))
  gcv_object_t _object__22freeaddrinfo_22;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(WIN32_NATIVE))
  gcv_object_t _object__22gai_strerror_22;
#endif
#if ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)) && (defined(WIN32_NATIVE))
  gcv_object_t _object__22getaddrinfo_22;
#endif
#if (defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)) && (defined(WIN32_NATIVE))
  gcv_object_t _object__22getnameinfo_22;
#endif
  gcv_object_t _object__28member_20_family_20_data_29;
#if defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)
  gcv_object_t _object___28or_20integer_20_28member_defined_28eai_again_29_Kagain_defined_28eai_badflags_29_Kbadflags_defined_28eai_fail_29_Kfail_defined_28eai_family_29_Kfamily_defined_28eai_memory_29_Kmemory_defined_28eai_noname_29_Knoname_defined_28eai_overflow_29_Koverflow_defined_28eai_service_29_Kservice_defined_28eai_socktype_29_Ksocktype_defined_28eai_system_29_Ksystem_defined_28eai_nodata_29_Knodata_defined_28eai_addrfamily_29_Kaddrfamily_defined_28eai_inprogress_29_Kinprogress_defined_28eai_canceled_29_Kcanceled_defined_28eai_notcanceled_29_Knotcanceled_defined_28eai_intr_29_Kintr_defined_28eai_idn_encode_29_Kidn_encode__29_29;
#endif
  gcv_object_t _object___28or_20null_20integer_20_28member_defined_28af_unspec_29_Kunspec_defined_28af_unix_29_Kunix_defined_28af_local_29_Klocal_defined_28af_inet_29_Kinet_defined_28af_implink_29_Kimplink_defined_28af_pup_29_Kpup_defined_28af_chaos_29_Kchaos_defined_28af_ax25_29_Kax25_defined_28af_datakit_29_Kdatakit_defined_28af_ccitt_29_Kccitt_defined_28af_ipx_29_Kipx_defined_28af_ns_29_Kns_defined_28af_iso_29_Kiso_defined_28af_osi_29_Kosi_defined_28af_ecma_29_Kecma_defined_28af_appletalk_29_Kappletalk_defined_28af_netrom_29_Knetrom_defined_28af_bridge_29_Kbridge_defined_28af_atmpvc_29_Katmpvc_defined_28af_x25_29_Kx25_defined_28af_inet6_29_Kinet6_defined_28af_rose_29_Krose_defined_28af_decnet_29_Kdecnet_defined_28af_netbeui_29_Knetbeui_defined_28af_security_29_Ksecurity_defined_28af_key_29_Kkey_defined_28af_netlink_29_Knetlink_defined_28af_dli_29_Kdli_defined_28af_lat_29_Klat_defined_28af_hylink_29_Khylink_defined_28af_ban_29_Kban_defined_28af_route_29_Kroute_defined_28af_packet_29_Kpacket_defined_28af_ash_29_Kash_defined_28af_econet_29_Keconet_defined_28af_atm_29_Katm_defined_28af_atmsvc_29_Katmsvc_defined_28af_sna_29_Ksna_defined_28af_irda_29_Kirda_defined_28af_netbios_29_Knetbios_defined_28af_voiceview_29_Kvoiceview_defined_28af_pppox_29_Kpppox_defined_28af_wanpipe_29_Kwanpipe_defined_28af_bluetooth_29_Kbluetooth_defined_28af_firefox_29_Kfirefox_defined_28af_cluster_29_Kcluster_defined_28af_12844_29_K12844_defined_28af_netdes_29_Knetdes__29_29;
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  gcv_object_t _object___28or_20null_20integer_20_28member_defined_28ai_passive_29_Kpassive_defined_28ai_canonname_29_Kcanonname_defined_28ai_numerichost_29_Knumerichost_defined_28ai_numericserv_29_Knumericserv_defined_28ai_v4mapped_29_Kv4mapped_defined_28ai_all_29_Kall_defined_28ai_addrconfig_29_Kaddrconfig__29_29;
#endif
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
  gcv_object_t _object___28or_20null_20integer_20_28member_defined_28iff_up_29_Kup_defined_28iff_broadcast_29_Kbroadcast_defined_28iff_debug_29_Kdebug_defined_28iff_loopback_29_Kloopback_defined_28iff_pointopoint_29_Kpointopoint_defined_28iff_notrailers_29_Knotrailers_defined_28iff_running_29_Krunning_defined_28iff_noarp_29_Knoarp_defined_28iff_promisc_29_Kpromisc_defined_28iff_allmulti_29_Kallmulti_defined_28iff_oactive_29_Koactive_defined_28iff_simplex_29_Ksimplex_defined_28iff_link0_29_Klink0_defined_28iff_link1_29_Klink1_defined_28iff_link2_29_Klink2_defined_28iff_altphys_29_Kaltphys_defined_28iff_polling_29_Kpolling_defined_28iff_ppromisc_29_Kppromisc_defined_28iff_monitor_29_Kmonitor_defined_28iff_staticarp_29_Kstaticarp_defined_28iff_needsgiant_29_Kneedsgiant_defined_28iff_master_29_Kmaster_defined_28iff_slave_29_Kslave_defined_28iff_multicast_29_Kmulticast_defined_28iff_portsel_29_Kportsel_defined_28iff_automedia_29_Kautomedia_defined_28iff_dynamic_29_Kdynamic_defined_28iff_lower_up_29_Klower_up_defined_28iff_dormant_29_Kdormant__29_29;
#endif
  gcv_object_t _object___28or_20null_20integer_20_28member_defined_28ipproto_ip_29_Kipproto_ip_defined_28ipproto_ipv6_29_Kipproto_ipv6_defined_28ipproto_icmp_29_Kipproto_icmp_defined_28ipproto_raw_29_Kipproto_raw_defined_28ipproto_tcp_29_Kipproto_tcp_defined_28ipproto_udp_29_Kipproto_udp_defined_28ipproto_igmp_29_Kipproto_igmp_defined_28ipproto_ipip_29_Kipproto_ipip_defined_28ipproto_egp_29_Kipproto_egp_defined_28ipproto_pup_29_Kipproto_pup_defined_28ipproto_idp_29_Kipproto_idp_defined_28ipproto_ggp_29_Kipproto_ggp_defined_28ipproto_nd_29_Kipproto_nd_defined_28ipproto_hopopts_29_Kipproto_hopopts_defined_28ipproto_routing_29_Kipproto_routing_defined_28ipproto_fragment_29_Kipproto_fragment_defined_28ipproto_esp_29_Kipproto_esp_defined_28ipproto_ah_29_Kipproto_ah_defined_28ipproto_icmpv6_29_Kipproto_icmpv6_defined_28ipproto_dstopts_29_Kipproto_dstopts_defined_28ipproto_none_29_Kipproto_none_defined_28ipproto_rsvp_29_Kipproto_rsvp_defined_28ipproto_gre_29_Kipproto_gre_defined_28ipproto_pim_29_Kipproto_pim_defined_28ipproto_comp_29_Kipproto_comp_defined_28nsproto_ipx_29_Knsproto_ipx_defined_28nsproto_spx_29_Knsproto_spx_defined_28nsproto_spxii_29_Knsproto_spxii_defined_28netlink_route_29_Knetlink_route_defined_28netlink_usersock_29_Knetlink_usersock_defined_28netlink_firewall_29_Knetlink_firewall_defined_28netlink_inet_diag_29_Knetlink_inet_diag_defined_28netlink_nflog_29_Knetlink_nflog_defined_28netlink_xfrm_29_Knetlink_xfrm_defined_28netlink_selinux_29_Knetlink_selinux_defined_28netlink_iscsi_29_Knetlink_iscsi_defined_28netlink_audit_29_Knetlink_audit_defined_28netlink_fib_lookup_29_Knetlink_fib_lookup_defined_28netlink_connector_29_Knetlink_connector_defined_28netlink_netfilter_29_Knetlink_netfilter_defined_28netlink_ip6_fw_29_Knetlink_ip6_fw_defined_28netlink_dnrtmsg_29_Knetlink_dnrtmsg_defined_28netlink_kobject_uevent_29_Knetlink_kobject_uevent_defined_28netlink_generic_29_Knetlink_generic_defined_28netlink_scsitransport_29_Knetlink_scsitransport_defined_28netlink_ecryptfs_29_Knetl;
#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
  gcv_object_t _object___28or_20null_20integer_20_28member_defined_28msg_oob_29_Koob_defined_28msg_peek_29_Kpeek_defined_28msg_dontroute_29_Kdontroute_defined_28msg_tryhard_29_Ktryhard_defined_28msg_ctrunc_29_Kctrunc_defined_28msg_proxy_29_Kproxy_defined_28msg_trunc_29_Ktrunc_defined_28msg_dontwait_29_Kdontwait_defined_28msg_eor_29_Keor_defined_28msg_waitall_29_Kwaitall_defined_28msg_fin_29_Kfin_defined_28msg_syn_29_Ksyn_defined_28msg_confirm_29_Kconfirm_defined_28msg_rst_29_Krst_defined_28msg_errqueue_29_Kerrqueue_defined_28msg_nosignal_29_Knosignal_defined_28msg_more_29_Kmore__29_29;
#endif
  gcv_object_t _object___28or_20null_20integer_20_28member_defined_28sock_stream_29_Kstream_defined_28sock_dgram_29_Kdgram_defined_28sock_raw_29_Kraw_defined_28sock_rdm_29_Krdm_defined_28sock_seqpacket_29_Kseqpacket_defined_28sock_packet_29_Kpacket__29_29;
#if defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)
  gcv_object_t _object___28or_20null_20integer_20_28member_defined_28so_debug_29_Kdebug_defined_28so_acceptconn_29_Kacceptconn_defined_28so_broadcast_29_Kbroadcast_defined_28so_useloopback_29_Kuseloopback_defined_28so_peercred_29_Kpeercred_defined_28so_reuseaddr_29_Kreuseaddr_defined_28so_keepalive_29_Kkeepalive_defined_28so_linger_29_Klinger_defined_28so_oobinline_29_Koobinline_defined_28so_sndbuf_29_Ksndbuf_defined_28so_rcvbuf_29_Krcvbuf_defined_28so_error_29_Kerror_defined_28so_type_29_Ktype_defined_28so_dontroute_29_Kdontroute_defined_28so_rcvlowat_29_Krcvlowat_defined_28so_rcvtimeo_29_Krcvtimeo_defined_28so_sndlowat_29_Ksndlowat_defined_28so_sndtimeo_29_Ksndtimeo__29_29;
#endif
#if defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)
  gcv_object_t _object___28or_20null_20integer_20_28member_Kall_defined_28sol_socket_29_Ksol_socket_defined_28sol_ip_29_Ksol_ip_defined_28sol_ipx_29_Ksol_ipx_defined_28sol_ax25_29_Ksol_ax25_defined_28sol_atalk_29_Ksol_atalk_defined_28sol_netrom_29_Ksol_netrom_defined_28sol_tcp_29_Ksol_tcp_defined_28sol_udp_29_Ksol_udp_defined_28ipproto_ip_29_Kipproto_ip_defined_28ipproto_ipv6_29_Kipproto_ipv6_defined_28ipproto_icmp_29_Kipproto_icmp_defined_28ipproto_raw_29_Kipproto_raw_defined_28ipproto_tcp_29_Kipproto_tcp_defined_28ipproto_udp_29_Kipproto_udp_defined_28ipproto_igmp_29_Kipproto_igmp_defined_28ipproto_ipip_29_Kipproto_ipip_defined_28ipproto_egp_29_Kipproto_egp_defined_28ipproto_pup_29_Kipproto_pup_defined_28ipproto_idp_29_Kipproto_idp_defined_28ipproto_ggp_29_Kipproto_ggp_defined_28ipproto_nd_29_Kipproto_nd_defined_28ipproto_hopopts_29_Kipproto_hopopts_defined_28ipproto_routing_29_Kipproto_routing_defined_28ipproto_fragment_29_Kipproto_fragment_defined_28ipproto_esp_29_Kipproto_esp_defined_28ipproto_ah_29_Kipproto_ah_defined_28ipproto_icmpv6_29_Kipproto_icmpv6_defined_28ipproto_dstopts_29_Kipproto_dstopts_defined_28ipproto_none_29_Kipproto_none__29_29;
#endif
} module__rawsock__object_tab;
uintC module__rawsock__object_tab_size = sizeof(module__rawsock__object_tab)/sizeof(gcv_object_t);

struct module__rawsock__object_tab_initdata_t {
#if defined(AF_12844)
  object_initdata_t _object_K12844;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_ACCEPTCONN))
  object_initdata_t _object_Kacceptconn;
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  object_initdata_t _object_Kaddrconfig;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_ADDRFAMILY))
  object_initdata_t _object_Kaddrfamily;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_AGAIN))
  object_initdata_t _object_Kagain;
#endif
#if ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)) || (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE))
  object_initdata_t _object_Kall;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_ALLMULTI))
  object_initdata_t _object_Kallmulti;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_ALTPHYS))
  object_initdata_t _object_Kaltphys;
#endif
#if defined(AF_APPLETALK)
  object_initdata_t _object_Kappletalk;
#endif
#if defined(AF_ASH)
  object_initdata_t _object_Kash;
#endif
#if defined(AF_ATM)
  object_initdata_t _object_Katm;
#endif
#if defined(AF_ATMPVC)
  object_initdata_t _object_Katmpvc;
#endif
#if defined(AF_ATMSVC)
  object_initdata_t _object_Katmsvc;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_AUTOMEDIA))
  object_initdata_t _object_Kautomedia;
#endif
#if defined(AF_AX25)
  object_initdata_t _object_Kax25;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_BADFLAGS))
  object_initdata_t _object_Kbadflags;
#endif
#if defined(AF_BAN)
  object_initdata_t _object_Kban;
#endif
#if defined(AF_BLUETOOTH)
  object_initdata_t _object_Kbluetooth;
#endif
#if defined(AF_BRIDGE)
  object_initdata_t _object_Kbridge;
#endif
#if ((defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_BROADCAST))) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_BROADCAST)))
  object_initdata_t _object_Kbroadcast;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_CANCELED))
  object_initdata_t _object_Kcanceled;
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  object_initdata_t _object_Kcanonname;
#endif
#if defined(AF_CCITT)
  object_initdata_t _object_Kccitt;
#endif
#if defined(AF_CHAOS)
  object_initdata_t _object_Kchaos;
#endif
#if defined(AF_CLUSTER)
  object_initdata_t _object_Kcluster;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_CONFIRM))
  object_initdata_t _object_Kconfirm;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_CTRUNC))
  object_initdata_t _object_Kctrunc;
#endif
  object_initdata_t _object_Kdata;
#if defined(AF_DATAKIT)
  object_initdata_t _object_Kdatakit;
#endif
#if ((defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_DEBUG))) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_DEBUG)))
  object_initdata_t _object_Kdebug;
#endif
#if defined(AF_DECnet)
  object_initdata_t _object_Kdecnet;
#endif
#if (defined(SOCK_DGRAM)) || (defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE))
  object_initdata_t _object_Kdgram;
#endif
#if defined(AF_DLI)
  object_initdata_t _object_Kdli;
#endif
#if ((defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_DONTROUTE))) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_DONTROUTE)))
  object_initdata_t _object_Kdontroute;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_DONTWAIT))
  object_initdata_t _object_Kdontwait;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_DORMANT))
  object_initdata_t _object_Kdormant;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_DYNAMIC))
  object_initdata_t _object_Kdynamic;
#endif
#if defined(AF_ECMA)
  object_initdata_t _object_Kecma;
#endif
#if defined(AF_ECONET)
  object_initdata_t _object_Keconet;
#endif
  object_initdata_t _object_Kend;
  object_initdata_t _object_Keor;
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_ERROR))
  object_initdata_t _object_Kerror;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_ERRQUEUE))
  object_initdata_t _object_Kerrqueue;
#endif
#if defined(ETH_P_802_2)
  object_initdata_t _object_Keth_p_802_2;
#endif
#if defined(ETH_P_802_3)
  object_initdata_t _object_Keth_p_802_3;
#endif
#if defined(ETH_P_AARP)
  object_initdata_t _object_Keth_p_aarp;
#endif
#if defined(ETH_P_ALL)
  object_initdata_t _object_Keth_p_all;
#endif
#if defined(ETH_P_ARP)
  object_initdata_t _object_Keth_p_arp;
#endif
#if defined(ETH_P_ATALK)
  object_initdata_t _object_Keth_p_atalk;
#endif
#if defined(ETH_P_ATMFATE)
  object_initdata_t _object_Keth_p_atmfate;
#endif
#if defined(ETH_P_ATMMPOA)
  object_initdata_t _object_Keth_p_atmmpoa;
#endif
#if defined(ETH_P_AX25)
  object_initdata_t _object_Keth_p_ax25;
#endif
#if defined(ETH_P_BPQ)
  object_initdata_t _object_Keth_p_bpq;
#endif
#if defined(ETH_P_CONTROL)
  object_initdata_t _object_Keth_p_control;
#endif
#if defined(ETH_P_CUST)
  object_initdata_t _object_Keth_p_cust;
#endif
#if defined(ETH_P_DDCMP)
  object_initdata_t _object_Keth_p_ddcmp;
#endif
#if defined(ETH_P_DEC)
  object_initdata_t _object_Keth_p_dec;
#endif
#if defined(ETH_P_DIAG)
  object_initdata_t _object_Keth_p_diag;
#endif
#if defined(ETH_P_DNA_DL)
  object_initdata_t _object_Keth_p_dna_dl;
#endif
#if defined(ETH_P_DNA_RC)
  object_initdata_t _object_Keth_p_dna_rc;
#endif
#if defined(ETH_P_DNA_RT)
  object_initdata_t _object_Keth_p_dna_rt;
#endif
#if defined(ETH_P_ECONET)
  object_initdata_t _object_Keth_p_econet;
#endif
#if defined(ETH_P_IEEEPUP)
  object_initdata_t _object_Keth_p_ieeepup;
#endif
#if defined(ETH_P_IEEEPUPAT)
  object_initdata_t _object_Keth_p_ieeepupat;
#endif
#if defined(ETH_P_IP)
  object_initdata_t _object_Keth_p_ip;
#endif
#if defined(ETH_P_IPV6)
  object_initdata_t _object_Keth_p_ipv6;
#endif
#if defined(ETH_P_IPX)
  object_initdata_t _object_Keth_p_ipx;
#endif
#if defined(ETH_P_IRDA)
  object_initdata_t _object_Keth_p_irda;
#endif
#if defined(ETH_P_LAT)
  object_initdata_t _object_Keth_p_lat;
#endif
#if defined(ETH_P_LOCALTALK)
  object_initdata_t _object_Keth_p_localtalk;
#endif
#if defined(ETH_P_LOOP)
  object_initdata_t _object_Keth_p_loop;
#endif
#if defined(ETH_P_MOBITEX)
  object_initdata_t _object_Keth_p_mobitex;
#endif
#if defined(ETH_P_PPPTALK)
  object_initdata_t _object_Keth_p_ppptalk;
#endif
#if defined(ETH_P_PPP_DISC)
  object_initdata_t _object_Keth_p_ppp_disc;
#endif
#if defined(ETH_P_PPP_MP)
  object_initdata_t _object_Keth_p_ppp_mp;
#endif
#if defined(ETH_P_PPP_SES)
  object_initdata_t _object_Keth_p_ppp_ses;
#endif
#if defined(ETH_P_PUP)
  object_initdata_t _object_Keth_p_pup;
#endif
#if defined(ETH_P_PUPAT)
  object_initdata_t _object_Keth_p_pupat;
#endif
#if defined(ETH_P_RARP)
  object_initdata_t _object_Keth_p_rarp;
#endif
#if defined(ETH_P_SCA)
  object_initdata_t _object_Keth_p_sca;
#endif
#if defined(ETH_P_SNAP)
  object_initdata_t _object_Keth_p_snap;
#endif
#if defined(ETH_P_TR_802_2)
  object_initdata_t _object_Keth_p_tr_802_2;
#endif
#if defined(ETH_P_WAN_PPP)
  object_initdata_t _object_Keth_p_wan_ppp;
#endif
#if defined(ETH_P_X25)
  object_initdata_t _object_Keth_p_x25;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_FAIL))
  object_initdata_t _object_Kfail;
#endif
  object_initdata_t _object_Kfamily;
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_FIN))
  object_initdata_t _object_Kfin;
#endif
#if defined(AF_FIREFOX)
  object_initdata_t _object_Kfirefox;
#endif
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
  object_initdata_t _object_Kflags_and;
#endif
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
  object_initdata_t _object_Kflags_or;
#endif
#if defined(AF_HYLINK)
  object_initdata_t _object_Khylink;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_IDN_ENCODE))
  object_initdata_t _object_Kidn_encode;
#endif
#if defined(AF_IMPLINK)
  object_initdata_t _object_Kimplink;
#endif
#if defined(AF_INET)
  object_initdata_t _object_Kinet;
#endif
#if defined(AF_INET6)
  object_initdata_t _object_Kinet6;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_INPROGRESS))
  object_initdata_t _object_Kinprogress;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_INTR))
  object_initdata_t _object_Kintr;
#endif
#if (defined(IPPROTO_AH)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_AH)))
  object_initdata_t _object_Kipproto_ah;
#endif
#if defined(IPPROTO_COMP)
  object_initdata_t _object_Kipproto_comp;
#endif
#if (defined(IPPROTO_DSTOPTS)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_DSTOPTS)))
  object_initdata_t _object_Kipproto_dstopts;
#endif
#if (defined(IPPROTO_EGP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_EGP)))
  object_initdata_t _object_Kipproto_egp;
#endif
#if (defined(IPPROTO_ESP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_ESP)))
  object_initdata_t _object_Kipproto_esp;
#endif
#if (defined(IPPROTO_FRAGMENT)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_FRAGMENT)))
  object_initdata_t _object_Kipproto_fragment;
#endif
#if (defined(IPPROTO_GGP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_GGP)))
  object_initdata_t _object_Kipproto_ggp;
#endif
#if defined(IPPROTO_GRE)
  object_initdata_t _object_Kipproto_gre;
#endif
#if (defined(IPPROTO_HOPOPTS)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_HOPOPTS)))
  object_initdata_t _object_Kipproto_hopopts;
#endif
#if (defined(IPPROTO_ICMP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_ICMP)))
  object_initdata_t _object_Kipproto_icmp;
#endif
#if (defined(IPPROTO_ICMPV6)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_ICMPV6)))
  object_initdata_t _object_Kipproto_icmpv6;
#endif
#if (defined(IPPROTO_IDP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_IDP)))
  object_initdata_t _object_Kipproto_idp;
#endif
#if (defined(IPPROTO_IGMP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_IGMP)))
  object_initdata_t _object_Kipproto_igmp;
#endif
#if (defined(IPPROTO_IP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_IP)))
  object_initdata_t _object_Kipproto_ip;
#endif
#if (defined(IPPROTO_IPIP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_IPIP)))
  object_initdata_t _object_Kipproto_ipip;
#endif
#if (defined(IPPROTO_IPV6)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_IPV6)))
  object_initdata_t _object_Kipproto_ipv6;
#endif
#if (defined(IPPROTO_ND)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_ND)))
  object_initdata_t _object_Kipproto_nd;
#endif
#if (defined(IPPROTO_NONE)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_NONE)))
  object_initdata_t _object_Kipproto_none;
#endif
#if defined(IPPROTO_PIM)
  object_initdata_t _object_Kipproto_pim;
#endif
#if (defined(IPPROTO_PUP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_PUP)))
  object_initdata_t _object_Kipproto_pup;
#endif
#if (defined(IPPROTO_RAW)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_RAW)))
  object_initdata_t _object_Kipproto_raw;
#endif
#if (defined(IPPROTO_ROUTING)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_ROUTING)))
  object_initdata_t _object_Kipproto_routing;
#endif
#if defined(IPPROTO_RSVP)
  object_initdata_t _object_Kipproto_rsvp;
#endif
#if (defined(IPPROTO_TCP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_TCP)))
  object_initdata_t _object_Kipproto_tcp;
#endif
#if (defined(IPPROTO_UDP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_UDP)))
  object_initdata_t _object_Kipproto_udp;
#endif
#if defined(AF_IPX)
  object_initdata_t _object_Kipx;
#endif
#if defined(AF_IRDA)
  object_initdata_t _object_Kirda;
#endif
#if defined(AF_ISO)
  object_initdata_t _object_Kiso;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_KEEPALIVE))
  object_initdata_t _object_Kkeepalive;
#endif
#if defined(AF_KEY)
  object_initdata_t _object_Kkey;
#endif
#if defined(AF_LAT)
  object_initdata_t _object_Klat;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(WIN32_NATIVE)) || (defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE))
  object_initdata_t _object_Klevel;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_LINGER))
  object_initdata_t _object_Klinger;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_LINK0))
  object_initdata_t _object_Klink0;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_LINK1))
  object_initdata_t _object_Klink1;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_LINK2))
  object_initdata_t _object_Klink2;
#endif
#if defined(AF_LOCAL)
  object_initdata_t _object_Klocal;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_LOOPBACK))
  object_initdata_t _object_Kloopback;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_LOWER_UP))
  object_initdata_t _object_Klower_up;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_MASTER))
  object_initdata_t _object_Kmaster;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_MEMORY))
  object_initdata_t _object_Kmemory;
#endif
  object_initdata_t _object_Kmessage;
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_MONITOR))
  object_initdata_t _object_Kmonitor;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_MORE))
  object_initdata_t _object_Kmore;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_MULTICAST))
  object_initdata_t _object_Kmulticast;
#endif
#if defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)
  object_initdata_t _object_Knamereqd;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_NEEDSGIANT))
  object_initdata_t _object_Kneedsgiant;
#endif
#if defined(AF_NETBEUI)
  object_initdata_t _object_Knetbeui;
#endif
#if defined(AF_NETBIOS)
  object_initdata_t _object_Knetbios;
#endif
#if defined(AF_NETDES)
  object_initdata_t _object_Knetdes;
#endif
#if defined(AF_NETLINK)
  object_initdata_t _object_Knetlink;
#endif
#if defined(NETLINK_AUDIT)
  object_initdata_t _object_Knetlink_audit;
#endif
#if defined(NETLINK_CONNECTOR)
  object_initdata_t _object_Knetlink_connector;
#endif
#if defined(NETLINK_DNRTMSG)
  object_initdata_t _object_Knetlink_dnrtmsg;
#endif
#if defined(NETLINK_ECRYPTFS)
  object_initdata_t _object_Knetlink_ecryptfs;
#endif
#if defined(NETLINK_FIB_LOOKUP)
  object_initdata_t _object_Knetlink_fib_lookup;
#endif
#if defined(NETLINK_FIREWALL)
  object_initdata_t _object_Knetlink_firewall;
#endif
#if defined(NETLINK_GENERIC)
  object_initdata_t _object_Knetlink_generic;
#endif
#if defined(NETLINK_INET_DIAG)
  object_initdata_t _object_Knetlink_inet_diag;
#endif
#if defined(NETLINK_IP6_FW)
  object_initdata_t _object_Knetlink_ip6_fw;
#endif
#if defined(NETLINK_ISCSI)
  object_initdata_t _object_Knetlink_iscsi;
#endif
#if defined(NETLINK_KOBJECT_UEVENT)
  object_initdata_t _object_Knetlink_kobject_uevent;
#endif
#if defined(NETLINK_NETFILTER)
  object_initdata_t _object_Knetlink_netfilter;
#endif
#if defined(NETLINK_NFLOG)
  object_initdata_t _object_Knetlink_nflog;
#endif
#if defined(NETLINK_ROUTE)
  object_initdata_t _object_Knetlink_route;
#endif
#if defined(NETLINK_SCSITRANSPORT)
  object_initdata_t _object_Knetlink_scsitransport;
#endif
#if defined(NETLINK_SELINUX)
  object_initdata_t _object_Knetlink_selinux;
#endif
#if defined(NETLINK_USERSOCK)
  object_initdata_t _object_Knetlink_usersock;
#endif
#if defined(NETLINK_XFRM)
  object_initdata_t _object_Knetlink_xfrm;
#endif
#if defined(AF_NETROM)
  object_initdata_t _object_Knetrom;
#endif
#if ((defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_NOARP))) || (defined(HAVE_NET_IF_H))
  object_initdata_t _object_Knoarp;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_NODATA))
  object_initdata_t _object_Knodata;
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  object_initdata_t _object_Knode;
#endif
#if defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)
  object_initdata_t _object_Knofqdn;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_NONAME))
  object_initdata_t _object_Knoname;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_NOSIGNAL))
  object_initdata_t _object_Knosignal;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_NOTCANCELED))
  object_initdata_t _object_Knotcanceled;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_NOTRAILERS))
  object_initdata_t _object_Knotrailers;
#endif
#if defined(AF_NS)
  object_initdata_t _object_Kns;
#endif
#if defined(NSPROTO_IPX)
  object_initdata_t _object_Knsproto_ipx;
#endif
#if defined(NSPROTO_SPX)
  object_initdata_t _object_Knsproto_spx;
#endif
#if defined(NSPROTO_SPXII)
  object_initdata_t _object_Knsproto_spxii;
#endif
#if (defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)) || ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE))
  object_initdata_t _object_Knumerichost;
#endif
#if defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)
  object_initdata_t _object_Knumericscope;
#endif
#if (defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)) || ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE))
  object_initdata_t _object_Knumericserv;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_OACTIVE))
  object_initdata_t _object_Koactive;
#endif
  object_initdata_t _object_Koob;
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_OOBINLINE))
  object_initdata_t _object_Koobinline;
#endif
#if defined(AF_OSI)
  object_initdata_t _object_Kosi;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_OVERFLOW))
  object_initdata_t _object_Koverflow;
#endif
#if (defined(AF_PACKET)) || (defined(SOCK_PACKET))
  object_initdata_t _object_Kpacket;
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  object_initdata_t _object_Kpassive;
#endif
  object_initdata_t _object_Kpeek;
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_PEERCRED))
  object_initdata_t _object_Kpeercred;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_POINTOPOINT))
  object_initdata_t _object_Kpointopoint;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_POLLING))
  object_initdata_t _object_Kpolling;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_PORTSEL))
  object_initdata_t _object_Kportsel;
#endif
#if defined(AF_PPPOX)
  object_initdata_t _object_Kpppox;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_PPROMISC))
  object_initdata_t _object_Kppromisc;
#endif
#if ((defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_PROMISC))) || (defined(HAVE_NET_IF_H))
  object_initdata_t _object_Kpromisc;
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  object_initdata_t _object_Kprotocol;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_PROXY))
  object_initdata_t _object_Kproxy;
#endif
#if defined(AF_PUP)
  object_initdata_t _object_Kpup;
#endif
#if defined(SOCK_RAW)
  object_initdata_t _object_Kraw;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_RCVBUF))
  object_initdata_t _object_Krcvbuf;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_RCVLOWAT))
  object_initdata_t _object_Krcvlowat;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_RCVTIMEO))
  object_initdata_t _object_Krcvtimeo;
#endif
#if defined(SOCK_RDM)
  object_initdata_t _object_Krdm;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_REUSEADDR))
  object_initdata_t _object_Kreuseaddr;
#endif
#if defined(AF_ROSE)
  object_initdata_t _object_Krose;
#endif
#if defined(AF_ROUTE)
  object_initdata_t _object_Kroute;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_RST))
  object_initdata_t _object_Krst;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_RUNNING))
  object_initdata_t _object_Krunning;
#endif
#if defined(AF_SECURITY)
  object_initdata_t _object_Ksecurity;
#endif
#if defined(SOCK_SEQPACKET)
  object_initdata_t _object_Kseqpacket;
#endif
#if ((defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_SERVICE))) || ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE))
  object_initdata_t _object_Kservice;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_SIMPLEX))
  object_initdata_t _object_Ksimplex;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_SLAVE))
  object_initdata_t _object_Kslave;
#endif
#if defined(AF_SNA)
  object_initdata_t _object_Ksna;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_SNDBUF))
  object_initdata_t _object_Ksndbuf;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_SNDLOWAT))
  object_initdata_t _object_Ksndlowat;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_SNDTIMEO))
  object_initdata_t _object_Ksndtimeo;
#endif
  object_initdata_t _object_Ksocket;
#if ((defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_SOCKTYPE))) || ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE))
  object_initdata_t _object_Ksocktype;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_ATALK))
  object_initdata_t _object_Ksol_atalk;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_AX25))
  object_initdata_t _object_Ksol_ax25;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_IP))
  object_initdata_t _object_Ksol_ip;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_IPX))
  object_initdata_t _object_Ksol_ipx;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_NETROM))
  object_initdata_t _object_Ksol_netrom;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_SOCKET))
  object_initdata_t _object_Ksol_socket;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_TCP))
  object_initdata_t _object_Ksol_tcp;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_UDP))
  object_initdata_t _object_Ksol_udp;
#endif
  object_initdata_t _object_Kstart;
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_STATICARP))
  object_initdata_t _object_Kstaticarp;
#endif
#if defined(SOCK_STREAM)
  object_initdata_t _object_Kstream;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_SYN))
  object_initdata_t _object_Ksyn;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_SYSTEM))
  object_initdata_t _object_Ksystem;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_TRUNC))
  object_initdata_t _object_Ktrunc;
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_TRYHARD))
  object_initdata_t _object_Ktryhard;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_TYPE))
  object_initdata_t _object_Ktype;
#endif
#if defined(AF_UNIX)
  object_initdata_t _object_Kunix;
#endif
#if defined(AF_UNSPEC)
  object_initdata_t _object_Kunspec;
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_UP))
  object_initdata_t _object_Kup;
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_USELOOPBACK))
  object_initdata_t _object_Kuseloopback;
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  object_initdata_t _object_Kv4mapped;
#endif
#if defined(AF_VOICEVIEW)
  object_initdata_t _object_Kvoiceview;
#endif
  object_initdata_t _object_Kwaitall;
#if defined(AF_WANPIPE)
  object_initdata_t _object_Kwanpipe;
#endif
#if defined(AF_X25)
  object_initdata_t _object_Kx25;
#endif
  object_initdata_t _object_os__errno;
  object_initdata_t _object_rawsock__eai;
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  object_initdata_t _object_rawsock__make_addrinfo;
#endif
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
  object_initdata_t _object_rawsock__make_ifaddrs;
#endif
#if defined(HAVE_NETDB_H)
  object_initdata_t _object_rawsock__make_network;
#endif
#if defined(HAVE_NETDB_H)
  object_initdata_t _object_rawsock__make_protocol;
#endif
  object_initdata_t _object_rawsock__make_sa;
#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
  object_initdata_t _object_rawsock__message;
#endif
  object_initdata_t _object_rawsock__rawsock_error;
  object_initdata_t _object_rawsock__sockaddr;
#if ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)) && (defined(WIN32_NATIVE))
  object_initdata_t _object__22freeaddrinfo_22;
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(WIN32_NATIVE))
  object_initdata_t _object__22gai_strerror_22;
#endif
#if ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)) && (defined(WIN32_NATIVE))
  object_initdata_t _object__22getaddrinfo_22;
#endif
#if (defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)) && (defined(WIN32_NATIVE))
  object_initdata_t _object__22getnameinfo_22;
#endif
  object_initdata_t _object__28member_20_family_20_data_29;
#if defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)
  object_initdata_t _object___28or_20integer_20_28member_defined_28eai_again_29_Kagain_defined_28eai_badflags_29_Kbadflags_defined_28eai_fail_29_Kfail_defined_28eai_family_29_Kfamily_defined_28eai_memory_29_Kmemory_defined_28eai_noname_29_Knoname_defined_28eai_overflow_29_Koverflow_defined_28eai_service_29_Kservice_defined_28eai_socktype_29_Ksocktype_defined_28eai_system_29_Ksystem_defined_28eai_nodata_29_Knodata_defined_28eai_addrfamily_29_Kaddrfamily_defined_28eai_inprogress_29_Kinprogress_defined_28eai_canceled_29_Kcanceled_defined_28eai_notcanceled_29_Knotcanceled_defined_28eai_intr_29_Kintr_defined_28eai_idn_encode_29_Kidn_encode__29_29;
#endif
  object_initdata_t _object___28or_20null_20integer_20_28member_defined_28af_unspec_29_Kunspec_defined_28af_unix_29_Kunix_defined_28af_local_29_Klocal_defined_28af_inet_29_Kinet_defined_28af_implink_29_Kimplink_defined_28af_pup_29_Kpup_defined_28af_chaos_29_Kchaos_defined_28af_ax25_29_Kax25_defined_28af_datakit_29_Kdatakit_defined_28af_ccitt_29_Kccitt_defined_28af_ipx_29_Kipx_defined_28af_ns_29_Kns_defined_28af_iso_29_Kiso_defined_28af_osi_29_Kosi_defined_28af_ecma_29_Kecma_defined_28af_appletalk_29_Kappletalk_defined_28af_netrom_29_Knetrom_defined_28af_bridge_29_Kbridge_defined_28af_atmpvc_29_Katmpvc_defined_28af_x25_29_Kx25_defined_28af_inet6_29_Kinet6_defined_28af_rose_29_Krose_defined_28af_decnet_29_Kdecnet_defined_28af_netbeui_29_Knetbeui_defined_28af_security_29_Ksecurity_defined_28af_key_29_Kkey_defined_28af_netlink_29_Knetlink_defined_28af_dli_29_Kdli_defined_28af_lat_29_Klat_defined_28af_hylink_29_Khylink_defined_28af_ban_29_Kban_defined_28af_route_29_Kroute_defined_28af_packet_29_Kpacket_defined_28af_ash_29_Kash_defined_28af_econet_29_Keconet_defined_28af_atm_29_Katm_defined_28af_atmsvc_29_Katmsvc_defined_28af_sna_29_Ksna_defined_28af_irda_29_Kirda_defined_28af_netbios_29_Knetbios_defined_28af_voiceview_29_Kvoiceview_defined_28af_pppox_29_Kpppox_defined_28af_wanpipe_29_Kwanpipe_defined_28af_bluetooth_29_Kbluetooth_defined_28af_firefox_29_Kfirefox_defined_28af_cluster_29_Kcluster_defined_28af_12844_29_K12844_defined_28af_netdes_29_Knetdes__29_29;
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  object_initdata_t _object___28or_20null_20integer_20_28member_defined_28ai_passive_29_Kpassive_defined_28ai_canonname_29_Kcanonname_defined_28ai_numerichost_29_Knumerichost_defined_28ai_numericserv_29_Knumericserv_defined_28ai_v4mapped_29_Kv4mapped_defined_28ai_all_29_Kall_defined_28ai_addrconfig_29_Kaddrconfig__29_29;
#endif
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
  object_initdata_t _object___28or_20null_20integer_20_28member_defined_28iff_up_29_Kup_defined_28iff_broadcast_29_Kbroadcast_defined_28iff_debug_29_Kdebug_defined_28iff_loopback_29_Kloopback_defined_28iff_pointopoint_29_Kpointopoint_defined_28iff_notrailers_29_Knotrailers_defined_28iff_running_29_Krunning_defined_28iff_noarp_29_Knoarp_defined_28iff_promisc_29_Kpromisc_defined_28iff_allmulti_29_Kallmulti_defined_28iff_oactive_29_Koactive_defined_28iff_simplex_29_Ksimplex_defined_28iff_link0_29_Klink0_defined_28iff_link1_29_Klink1_defined_28iff_link2_29_Klink2_defined_28iff_altphys_29_Kaltphys_defined_28iff_polling_29_Kpolling_defined_28iff_ppromisc_29_Kppromisc_defined_28iff_monitor_29_Kmonitor_defined_28iff_staticarp_29_Kstaticarp_defined_28iff_needsgiant_29_Kneedsgiant_defined_28iff_master_29_Kmaster_defined_28iff_slave_29_Kslave_defined_28iff_multicast_29_Kmulticast_defined_28iff_portsel_29_Kportsel_defined_28iff_automedia_29_Kautomedia_defined_28iff_dynamic_29_Kdynamic_defined_28iff_lower_up_29_Klower_up_defined_28iff_dormant_29_Kdormant__29_29;
#endif
  object_initdata_t _object___28or_20null_20integer_20_28member_defined_28ipproto_ip_29_Kipproto_ip_defined_28ipproto_ipv6_29_Kipproto_ipv6_defined_28ipproto_icmp_29_Kipproto_icmp_defined_28ipproto_raw_29_Kipproto_raw_defined_28ipproto_tcp_29_Kipproto_tcp_defined_28ipproto_udp_29_Kipproto_udp_defined_28ipproto_igmp_29_Kipproto_igmp_defined_28ipproto_ipip_29_Kipproto_ipip_defined_28ipproto_egp_29_Kipproto_egp_defined_28ipproto_pup_29_Kipproto_pup_defined_28ipproto_idp_29_Kipproto_idp_defined_28ipproto_ggp_29_Kipproto_ggp_defined_28ipproto_nd_29_Kipproto_nd_defined_28ipproto_hopopts_29_Kipproto_hopopts_defined_28ipproto_routing_29_Kipproto_routing_defined_28ipproto_fragment_29_Kipproto_fragment_defined_28ipproto_esp_29_Kipproto_esp_defined_28ipproto_ah_29_Kipproto_ah_defined_28ipproto_icmpv6_29_Kipproto_icmpv6_defined_28ipproto_dstopts_29_Kipproto_dstopts_defined_28ipproto_none_29_Kipproto_none_defined_28ipproto_rsvp_29_Kipproto_rsvp_defined_28ipproto_gre_29_Kipproto_gre_defined_28ipproto_pim_29_Kipproto_pim_defined_28ipproto_comp_29_Kipproto_comp_defined_28nsproto_ipx_29_Knsproto_ipx_defined_28nsproto_spx_29_Knsproto_spx_defined_28nsproto_spxii_29_Knsproto_spxii_defined_28netlink_route_29_Knetlink_route_defined_28netlink_usersock_29_Knetlink_usersock_defined_28netlink_firewall_29_Knetlink_firewall_defined_28netlink_inet_diag_29_Knetlink_inet_diag_defined_28netlink_nflog_29_Knetlink_nflog_defined_28netlink_xfrm_29_Knetlink_xfrm_defined_28netlink_selinux_29_Knetlink_selinux_defined_28netlink_iscsi_29_Knetlink_iscsi_defined_28netlink_audit_29_Knetlink_audit_defined_28netlink_fib_lookup_29_Knetlink_fib_lookup_defined_28netlink_connector_29_Knetlink_connector_defined_28netlink_netfilter_29_Knetlink_netfilter_defined_28netlink_ip6_fw_29_Knetlink_ip6_fw_defined_28netlink_dnrtmsg_29_Knetlink_dnrtmsg_defined_28netlink_kobject_uevent_29_Knetlink_kobject_uevent_defined_28netlink_generic_29_Knetlink_generic_defined_28netlink_scsitransport_29_Knetlink_scsitransport_defined_28netlink_ecryptfs_29_Knetl;
#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
  object_initdata_t _object___28or_20null_20integer_20_28member_defined_28msg_oob_29_Koob_defined_28msg_peek_29_Kpeek_defined_28msg_dontroute_29_Kdontroute_defined_28msg_tryhard_29_Ktryhard_defined_28msg_ctrunc_29_Kctrunc_defined_28msg_proxy_29_Kproxy_defined_28msg_trunc_29_Ktrunc_defined_28msg_dontwait_29_Kdontwait_defined_28msg_eor_29_Keor_defined_28msg_waitall_29_Kwaitall_defined_28msg_fin_29_Kfin_defined_28msg_syn_29_Ksyn_defined_28msg_confirm_29_Kconfirm_defined_28msg_rst_29_Krst_defined_28msg_errqueue_29_Kerrqueue_defined_28msg_nosignal_29_Knosignal_defined_28msg_more_29_Kmore__29_29;
#endif
  object_initdata_t _object___28or_20null_20integer_20_28member_defined_28sock_stream_29_Kstream_defined_28sock_dgram_29_Kdgram_defined_28sock_raw_29_Kraw_defined_28sock_rdm_29_Krdm_defined_28sock_seqpacket_29_Kseqpacket_defined_28sock_packet_29_Kpacket__29_29;
#if defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)
  object_initdata_t _object___28or_20null_20integer_20_28member_defined_28so_debug_29_Kdebug_defined_28so_acceptconn_29_Kacceptconn_defined_28so_broadcast_29_Kbroadcast_defined_28so_useloopback_29_Kuseloopback_defined_28so_peercred_29_Kpeercred_defined_28so_reuseaddr_29_Kreuseaddr_defined_28so_keepalive_29_Kkeepalive_defined_28so_linger_29_Klinger_defined_28so_oobinline_29_Koobinline_defined_28so_sndbuf_29_Ksndbuf_defined_28so_rcvbuf_29_Krcvbuf_defined_28so_error_29_Kerror_defined_28so_type_29_Ktype_defined_28so_dontroute_29_Kdontroute_defined_28so_rcvlowat_29_Krcvlowat_defined_28so_rcvtimeo_29_Krcvtimeo_defined_28so_sndlowat_29_Ksndlowat_defined_28so_sndtimeo_29_Ksndtimeo__29_29;
#endif
#if defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)
  object_initdata_t _object___28or_20null_20integer_20_28member_Kall_defined_28sol_socket_29_Ksol_socket_defined_28sol_ip_29_Ksol_ip_defined_28sol_ipx_29_Ksol_ipx_defined_28sol_ax25_29_Ksol_ax25_defined_28sol_atalk_29_Ksol_atalk_defined_28sol_netrom_29_Ksol_netrom_defined_28sol_tcp_29_Ksol_tcp_defined_28sol_udp_29_Ksol_udp_defined_28ipproto_ip_29_Kipproto_ip_defined_28ipproto_ipv6_29_Kipproto_ipv6_defined_28ipproto_icmp_29_Kipproto_icmp_defined_28ipproto_raw_29_Kipproto_raw_defined_28ipproto_tcp_29_Kipproto_tcp_defined_28ipproto_udp_29_Kipproto_udp_defined_28ipproto_igmp_29_Kipproto_igmp_defined_28ipproto_ipip_29_Kipproto_ipip_defined_28ipproto_egp_29_Kipproto_egp_defined_28ipproto_pup_29_Kipproto_pup_defined_28ipproto_idp_29_Kipproto_idp_defined_28ipproto_ggp_29_Kipproto_ggp_defined_28ipproto_nd_29_Kipproto_nd_defined_28ipproto_hopopts_29_Kipproto_hopopts_defined_28ipproto_routing_29_Kipproto_routing_defined_28ipproto_fragment_29_Kipproto_fragment_defined_28ipproto_esp_29_Kipproto_esp_defined_28ipproto_ah_29_Kipproto_ah_defined_28ipproto_icmpv6_29_Kipproto_icmpv6_defined_28ipproto_dstopts_29_Kipproto_dstopts_defined_28ipproto_none_29_Kipproto_none__29_29;
#endif
  int _dummy_to_avoid_trailing_comma_in_initializer;
} module__rawsock__object_tab_initdata = {
#if defined(AF_12844)
  { ":12844" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_ACCEPTCONN))
  { ":ACCEPTCONN" },
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  { ":ADDRCONFIG" },
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_ADDRFAMILY))
  { ":ADDRFAMILY" },
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_AGAIN))
  { ":AGAIN" },
#endif
#if ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)) || (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE))
  { ":ALL" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_ALLMULTI))
  { ":ALLMULTI" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_ALTPHYS))
  { ":ALTPHYS" },
#endif
#if defined(AF_APPLETALK)
  { ":APPLETALK" },
#endif
#if defined(AF_ASH)
  { ":ASH" },
#endif
#if defined(AF_ATM)
  { ":ATM" },
#endif
#if defined(AF_ATMPVC)
  { ":ATMPVC" },
#endif
#if defined(AF_ATMSVC)
  { ":ATMSVC" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_AUTOMEDIA))
  { ":AUTOMEDIA" },
#endif
#if defined(AF_AX25)
  { ":AX25" },
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_BADFLAGS))
  { ":BADFLAGS" },
#endif
#if defined(AF_BAN)
  { ":BAN" },
#endif
#if defined(AF_BLUETOOTH)
  { ":BLUETOOTH" },
#endif
#if defined(AF_BRIDGE)
  { ":BRIDGE" },
#endif
#if ((defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_BROADCAST))) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_BROADCAST)))
  { ":BROADCAST" },
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_CANCELED))
  { ":CANCELED" },
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  { ":CANONNAME" },
#endif
#if defined(AF_CCITT)
  { ":CCITT" },
#endif
#if defined(AF_CHAOS)
  { ":CHAOS" },
#endif
#if defined(AF_CLUSTER)
  { ":CLUSTER" },
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_CONFIRM))
  { ":CONFIRM" },
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_CTRUNC))
  { ":CTRUNC" },
#endif
  { ":DATA" },
#if defined(AF_DATAKIT)
  { ":DATAKIT" },
#endif
#if ((defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_DEBUG))) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_DEBUG)))
  { ":DEBUG" },
#endif
#if defined(AF_DECnet)
  { ":DECNET" },
#endif
#if (defined(SOCK_DGRAM)) || (defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE))
  { ":DGRAM" },
#endif
#if defined(AF_DLI)
  { ":DLI" },
#endif
#if ((defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_DONTROUTE))) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_DONTROUTE)))
  { ":DONTROUTE" },
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_DONTWAIT))
  { ":DONTWAIT" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_DORMANT))
  { ":DORMANT" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_DYNAMIC))
  { ":DYNAMIC" },
#endif
#if defined(AF_ECMA)
  { ":ECMA" },
#endif
#if defined(AF_ECONET)
  { ":ECONET" },
#endif
  { ":END" },
  { ":EOR" },
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_ERROR))
  { ":ERROR" },
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_ERRQUEUE))
  { ":ERRQUEUE" },
#endif
#if defined(ETH_P_802_2)
  { ":ETH-P-802-2" },
#endif
#if defined(ETH_P_802_3)
  { ":ETH-P-802-3" },
#endif
#if defined(ETH_P_AARP)
  { ":ETH-P-AARP" },
#endif
#if defined(ETH_P_ALL)
  { ":ETH-P-ALL" },
#endif
#if defined(ETH_P_ARP)
  { ":ETH-P-ARP" },
#endif
#if defined(ETH_P_ATALK)
  { ":ETH-P-ATALK" },
#endif
#if defined(ETH_P_ATMFATE)
  { ":ETH-P-ATMFATE" },
#endif
#if defined(ETH_P_ATMMPOA)
  { ":ETH-P-ATMMPOA" },
#endif
#if defined(ETH_P_AX25)
  { ":ETH-P-AX25" },
#endif
#if defined(ETH_P_BPQ)
  { ":ETH-P-BPQ" },
#endif
#if defined(ETH_P_CONTROL)
  { ":ETH-P-CONTROL" },
#endif
#if defined(ETH_P_CUST)
  { ":ETH-P-CUST" },
#endif
#if defined(ETH_P_DDCMP)
  { ":ETH-P-DDCMP" },
#endif
#if defined(ETH_P_DEC)
  { ":ETH-P-DEC" },
#endif
#if defined(ETH_P_DIAG)
  { ":ETH-P-DIAG" },
#endif
#if defined(ETH_P_DNA_DL)
  { ":ETH-P-DNA-DL" },
#endif
#if defined(ETH_P_DNA_RC)
  { ":ETH-P-DNA-RC" },
#endif
#if defined(ETH_P_DNA_RT)
  { ":ETH-P-DNA-RT" },
#endif
#if defined(ETH_P_ECONET)
  { ":ETH-P-ECONET" },
#endif
#if defined(ETH_P_IEEEPUP)
  { ":ETH-P-IEEEPUP" },
#endif
#if defined(ETH_P_IEEEPUPAT)
  { ":ETH-P-IEEEPUPAT" },
#endif
#if defined(ETH_P_IP)
  { ":ETH-P-IP" },
#endif
#if defined(ETH_P_IPV6)
  { ":ETH-P-IPV6" },
#endif
#if defined(ETH_P_IPX)
  { ":ETH-P-IPX" },
#endif
#if defined(ETH_P_IRDA)
  { ":ETH-P-IRDA" },
#endif
#if defined(ETH_P_LAT)
  { ":ETH-P-LAT" },
#endif
#if defined(ETH_P_LOCALTALK)
  { ":ETH-P-LOCALTALK" },
#endif
#if defined(ETH_P_LOOP)
  { ":ETH-P-LOOP" },
#endif
#if defined(ETH_P_MOBITEX)
  { ":ETH-P-MOBITEX" },
#endif
#if defined(ETH_P_PPPTALK)
  { ":ETH-P-PPPTALK" },
#endif
#if defined(ETH_P_PPP_DISC)
  { ":ETH-P-PPP-DISC" },
#endif
#if defined(ETH_P_PPP_MP)
  { ":ETH-P-PPP-MP" },
#endif
#if defined(ETH_P_PPP_SES)
  { ":ETH-P-PPP-SES" },
#endif
#if defined(ETH_P_PUP)
  { ":ETH-P-PUP" },
#endif
#if defined(ETH_P_PUPAT)
  { ":ETH-P-PUPAT" },
#endif
#if defined(ETH_P_RARP)
  { ":ETH-P-RARP" },
#endif
#if defined(ETH_P_SCA)
  { ":ETH-P-SCA" },
#endif
#if defined(ETH_P_SNAP)
  { ":ETH-P-SNAP" },
#endif
#if defined(ETH_P_TR_802_2)
  { ":ETH-P-TR-802-2" },
#endif
#if defined(ETH_P_WAN_PPP)
  { ":ETH-P-WAN-PPP" },
#endif
#if defined(ETH_P_X25)
  { ":ETH-P-X25" },
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_FAIL))
  { ":FAIL" },
#endif
  { ":FAMILY" },
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_FIN))
  { ":FIN" },
#endif
#if defined(AF_FIREFOX)
  { ":FIREFOX" },
#endif
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
  { ":FLAGS-AND" },
#endif
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
  { ":FLAGS-OR" },
#endif
#if defined(AF_HYLINK)
  { ":HYLINK" },
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_IDN_ENCODE))
  { ":IDN_ENCODE" },
#endif
#if defined(AF_IMPLINK)
  { ":IMPLINK" },
#endif
#if defined(AF_INET)
  { ":INET" },
#endif
#if defined(AF_INET6)
  { ":INET6" },
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_INPROGRESS))
  { ":INPROGRESS" },
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_INTR))
  { ":INTR" },
#endif
#if (defined(IPPROTO_AH)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_AH)))
  { ":IPPROTO-AH" },
#endif
#if defined(IPPROTO_COMP)
  { ":IPPROTO-COMP" },
#endif
#if (defined(IPPROTO_DSTOPTS)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_DSTOPTS)))
  { ":IPPROTO-DSTOPTS" },
#endif
#if (defined(IPPROTO_EGP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_EGP)))
  { ":IPPROTO-EGP" },
#endif
#if (defined(IPPROTO_ESP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_ESP)))
  { ":IPPROTO-ESP" },
#endif
#if (defined(IPPROTO_FRAGMENT)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_FRAGMENT)))
  { ":IPPROTO-FRAGMENT" },
#endif
#if (defined(IPPROTO_GGP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_GGP)))
  { ":IPPROTO-GGP" },
#endif
#if defined(IPPROTO_GRE)
  { ":IPPROTO-GRE" },
#endif
#if (defined(IPPROTO_HOPOPTS)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_HOPOPTS)))
  { ":IPPROTO-HOPOPTS" },
#endif
#if (defined(IPPROTO_ICMP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_ICMP)))
  { ":IPPROTO-ICMP" },
#endif
#if (defined(IPPROTO_ICMPV6)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_ICMPV6)))
  { ":IPPROTO-ICMPV6" },
#endif
#if (defined(IPPROTO_IDP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_IDP)))
  { ":IPPROTO-IDP" },
#endif
#if (defined(IPPROTO_IGMP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_IGMP)))
  { ":IPPROTO-IGMP" },
#endif
#if (defined(IPPROTO_IP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_IP)))
  { ":IPPROTO-IP" },
#endif
#if (defined(IPPROTO_IPIP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_IPIP)))
  { ":IPPROTO-IPIP" },
#endif
#if (defined(IPPROTO_IPV6)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_IPV6)))
  { ":IPPROTO-IPV6" },
#endif
#if (defined(IPPROTO_ND)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_ND)))
  { ":IPPROTO-ND" },
#endif
#if (defined(IPPROTO_NONE)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_NONE)))
  { ":IPPROTO-NONE" },
#endif
#if defined(IPPROTO_PIM)
  { ":IPPROTO-PIM" },
#endif
#if (defined(IPPROTO_PUP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_PUP)))
  { ":IPPROTO-PUP" },
#endif
#if (defined(IPPROTO_RAW)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_RAW)))
  { ":IPPROTO-RAW" },
#endif
#if (defined(IPPROTO_ROUTING)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_ROUTING)))
  { ":IPPROTO-ROUTING" },
#endif
#if defined(IPPROTO_RSVP)
  { ":IPPROTO-RSVP" },
#endif
#if (defined(IPPROTO_TCP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_TCP)))
  { ":IPPROTO-TCP" },
#endif
#if (defined(IPPROTO_UDP)) || ((defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(IPPROTO_UDP)))
  { ":IPPROTO-UDP" },
#endif
#if defined(AF_IPX)
  { ":IPX" },
#endif
#if defined(AF_IRDA)
  { ":IRDA" },
#endif
#if defined(AF_ISO)
  { ":ISO" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_KEEPALIVE))
  { ":KEEPALIVE" },
#endif
#if defined(AF_KEY)
  { ":KEY" },
#endif
#if defined(AF_LAT)
  { ":LAT" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(WIN32_NATIVE)) || (defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE))
  { ":LEVEL" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_LINGER))
  { ":LINGER" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_LINK0))
  { ":LINK0" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_LINK1))
  { ":LINK1" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_LINK2))
  { ":LINK2" },
#endif
#if defined(AF_LOCAL)
  { ":LOCAL" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_LOOPBACK))
  { ":LOOPBACK" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_LOWER_UP))
  { ":LOWER-UP" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_MASTER))
  { ":MASTER" },
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_MEMORY))
  { ":MEMORY" },
#endif
  { ":MESSAGE" },
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_MONITOR))
  { ":MONITOR" },
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_MORE))
  { ":MORE" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_MULTICAST))
  { ":MULTICAST" },
#endif
#if defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)
  { ":NAMEREQD" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_NEEDSGIANT))
  { ":NEEDSGIANT" },
#endif
#if defined(AF_NETBEUI)
  { ":NETBEUI" },
#endif
#if defined(AF_NETBIOS)
  { ":NETBIOS" },
#endif
#if defined(AF_NETDES)
  { ":NETDES" },
#endif
#if defined(AF_NETLINK)
  { ":NETLINK" },
#endif
#if defined(NETLINK_AUDIT)
  { ":NETLINK-AUDIT" },
#endif
#if defined(NETLINK_CONNECTOR)
  { ":NETLINK-CONNECTOR" },
#endif
#if defined(NETLINK_DNRTMSG)
  { ":NETLINK-DNRTMSG" },
#endif
#if defined(NETLINK_ECRYPTFS)
  { ":NETLINK-ECRYPTFS" },
#endif
#if defined(NETLINK_FIB_LOOKUP)
  { ":NETLINK-FIB-LOOKUP" },
#endif
#if defined(NETLINK_FIREWALL)
  { ":NETLINK-FIREWALL" },
#endif
#if defined(NETLINK_GENERIC)
  { ":NETLINK-GENERIC" },
#endif
#if defined(NETLINK_INET_DIAG)
  { ":NETLINK-INET-DIAG" },
#endif
#if defined(NETLINK_IP6_FW)
  { ":NETLINK-IP6-FW" },
#endif
#if defined(NETLINK_ISCSI)
  { ":NETLINK-ISCSI" },
#endif
#if defined(NETLINK_KOBJECT_UEVENT)
  { ":NETLINK-KOBJECT-UEVENT" },
#endif
#if defined(NETLINK_NETFILTER)
  { ":NETLINK-NETFILTER" },
#endif
#if defined(NETLINK_NFLOG)
  { ":NETLINK-NFLOG" },
#endif
#if defined(NETLINK_ROUTE)
  { ":NETLINK-ROUTE" },
#endif
#if defined(NETLINK_SCSITRANSPORT)
  { ":NETLINK-SCSITRANSPORT" },
#endif
#if defined(NETLINK_SELINUX)
  { ":NETLINK-SELINUX" },
#endif
#if defined(NETLINK_USERSOCK)
  { ":NETLINK-USERSOCK" },
#endif
#if defined(NETLINK_XFRM)
  { ":NETLINK-XFRM" },
#endif
#if defined(AF_NETROM)
  { ":NETROM" },
#endif
#if ((defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_NOARP))) || (defined(HAVE_NET_IF_H))
  { ":NOARP" },
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_NODATA))
  { ":NODATA" },
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  { ":NODE" },
#endif
#if defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)
  { ":NOFQDN" },
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_NONAME))
  { ":NONAME" },
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_NOSIGNAL))
  { ":NOSIGNAL" },
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_NOTCANCELED))
  { ":NOTCANCELED" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_NOTRAILERS))
  { ":NOTRAILERS" },
#endif
#if defined(AF_NS)
  { ":NS" },
#endif
#if defined(NSPROTO_IPX)
  { ":NSPROTO-IPX" },
#endif
#if defined(NSPROTO_SPX)
  { ":NSPROTO-SPX" },
#endif
#if defined(NSPROTO_SPXII)
  { ":NSPROTO-SPXII" },
#endif
#if (defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)) || ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE))
  { ":NUMERICHOST" },
#endif
#if defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)
  { ":NUMERICSCOPE" },
#endif
#if (defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)) || ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE))
  { ":NUMERICSERV" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_OACTIVE))
  { ":OACTIVE" },
#endif
  { ":OOB" },
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_OOBINLINE))
  { ":OOBINLINE" },
#endif
#if defined(AF_OSI)
  { ":OSI" },
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_OVERFLOW))
  { ":OVERFLOW" },
#endif
#if (defined(AF_PACKET)) || (defined(SOCK_PACKET))
  { ":PACKET" },
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  { ":PASSIVE" },
#endif
  { ":PEEK" },
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_PEERCRED))
  { ":PEERCRED" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_POINTOPOINT))
  { ":POINTOPOINT" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_POLLING))
  { ":POLLING" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_PORTSEL))
  { ":PORTSEL" },
#endif
#if defined(AF_PPPOX)
  { ":PPPOX" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_PPROMISC))
  { ":PPROMISC" },
#endif
#if ((defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_PROMISC))) || (defined(HAVE_NET_IF_H))
  { ":PROMISC" },
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  { ":PROTOCOL" },
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_PROXY))
  { ":PROXY" },
#endif
#if defined(AF_PUP)
  { ":PUP" },
#endif
#if defined(SOCK_RAW)
  { ":RAW" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_RCVBUF))
  { ":RCVBUF" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_RCVLOWAT))
  { ":RCVLOWAT" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_RCVTIMEO))
  { ":RCVTIMEO" },
#endif
#if defined(SOCK_RDM)
  { ":RDM" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_REUSEADDR))
  { ":REUSEADDR" },
#endif
#if defined(AF_ROSE)
  { ":ROSE" },
#endif
#if defined(AF_ROUTE)
  { ":ROUTE" },
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_RST))
  { ":RST" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_RUNNING))
  { ":RUNNING" },
#endif
#if defined(AF_SECURITY)
  { ":SECURITY" },
#endif
#if defined(SOCK_SEQPACKET)
  { ":SEQPACKET" },
#endif
#if ((defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_SERVICE))) || ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE))
  { ":SERVICE" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_SIMPLEX))
  { ":SIMPLEX" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_SLAVE))
  { ":SLAVE" },
#endif
#if defined(AF_SNA)
  { ":SNA" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_SNDBUF))
  { ":SNDBUF" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_SNDLOWAT))
  { ":SNDLOWAT" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_SNDTIMEO))
  { ":SNDTIMEO" },
#endif
  { ":SOCKET" },
#if ((defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_SOCKTYPE))) || ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE))
  { ":SOCKTYPE" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_ATALK))
  { ":SOL-ATALK" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_AX25))
  { ":SOL-AX25" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_IP))
  { ":SOL-IP" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_IPX))
  { ":SOL-IPX" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_NETROM))
  { ":SOL-NETROM" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_SOCKET))
  { ":SOL-SOCKET" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_TCP))
  { ":SOL-TCP" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SOL_UDP))
  { ":SOL-UDP" },
#endif
  { ":START" },
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_STATICARP))
  { ":STATICARP" },
#endif
#if defined(SOCK_STREAM)
  { ":STREAM" },
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_SYN))
  { ":SYN" },
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(EAI_SYSTEM))
  { ":SYSTEM" },
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_TRUNC))
  { ":TRUNC" },
#endif
#if (defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)) && (defined(MSG_TRYHARD))
  { ":TRYHARD" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_TYPE))
  { ":TYPE" },
#endif
#if defined(AF_UNIX)
  { ":UNIX" },
#endif
#if defined(AF_UNSPEC)
  { ":UNSPEC" },
#endif
#if (defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)) && (defined(IFF_UP))
  { ":UP" },
#endif
#if (defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)) && (defined(SO_USELOOPBACK))
  { ":USELOOPBACK" },
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  { ":V4MAPPED" },
#endif
#if defined(AF_VOICEVIEW)
  { ":VOICEVIEW" },
#endif
  { ":WAITALL" },
#if defined(AF_WANPIPE)
  { ":WANPIPE" },
#endif
#if defined(AF_X25)
  { ":X25" },
#endif
  { "OS::ERRNO" },
  { "RAWSOCK::EAI" },
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  { "RAWSOCK::MAKE-ADDRINFO" },
#endif
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
  { "RAWSOCK::MAKE-IFADDRS" },
#endif
#if defined(HAVE_NETDB_H)
  { "RAWSOCK::MAKE-NETWORK" },
#endif
#if defined(HAVE_NETDB_H)
  { "RAWSOCK::MAKE-PROTOCOL" },
#endif
  { "RAWSOCK::MAKE-SA" },
#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
  { "RAWSOCK::MESSAGE" },
#endif
  { "RAWSOCK::RAWSOCK-ERROR" },
  { "RAWSOCK::SOCKADDR" },
#if ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)) && (defined(WIN32_NATIVE))
  { "\"freeaddrinfo\"" },
#endif
#if (defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)) && (defined(WIN32_NATIVE))
  { "\"gai_strerror\"" },
#endif
#if ((defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)) && (defined(WIN32_NATIVE))
  { "\"getaddrinfo\"" },
#endif
#if (defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)) && (defined(WIN32_NATIVE))
  { "\"getnameinfo\"" },
#endif
  { "(MEMBER :FAMILY :DATA)" },
#if defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)
  {
    " " "(OR INTEGER (MEMBER"
#  if defined(EAI_AGAIN)
    " " ":AGAIN"
#  endif
#  if defined(EAI_BADFLAGS)
    " " ":BADFLAGS"
#  endif
#  if defined(EAI_FAIL)
    " " ":FAIL"
#  endif
#  if defined(EAI_FAMILY)
    " " ":FAMILY"
#  endif
#  if defined(EAI_MEMORY)
    " " ":MEMORY"
#  endif
#  if defined(EAI_NONAME)
    " " ":NONAME"
#  endif
#  if defined(EAI_OVERFLOW)
    " " ":OVERFLOW"
#  endif
#  if defined(EAI_SERVICE)
    " " ":SERVICE"
#  endif
#  if defined(EAI_SOCKTYPE)
    " " ":SOCKTYPE"
#  endif
#  if defined(EAI_SYSTEM)
    " " ":SYSTEM"
#  endif
#  if defined(EAI_NODATA)
    " " ":NODATA"
#  endif
#  if defined(EAI_ADDRFAMILY)
    " " ":ADDRFAMILY"
#  endif
#  if defined(EAI_INPROGRESS)
    " " ":INPROGRESS"
#  endif
#  if defined(EAI_CANCELED)
    " " ":CANCELED"
#  endif
#  if defined(EAI_NOTCANCELED)
    " " ":NOTCANCELED"
#  endif
#  if defined(EAI_INTR)
    " " ":INTR"
#  endif
#  if defined(EAI_IDN_ENCODE)
    " " ":IDN_ENCODE"
#  endif
    " " "))"
  },
#endif
  {
    " " "(OR NULL INTEGER (MEMBER"
#  if defined(AF_UNSPEC)
    " " ":UNSPEC"
#  endif
#  if defined(AF_UNIX)
    " " ":UNIX"
#  endif
#  if defined(AF_LOCAL)
    " " ":LOCAL"
#  endif
#  if defined(AF_INET)
    " " ":INET"
#  endif
#  if defined(AF_IMPLINK)
    " " ":IMPLINK"
#  endif
#  if defined(AF_PUP)
    " " ":PUP"
#  endif
#  if defined(AF_CHAOS)
    " " ":CHAOS"
#  endif
#  if defined(AF_AX25)
    " " ":AX25"
#  endif
#  if defined(AF_DATAKIT)
    " " ":DATAKIT"
#  endif
#  if defined(AF_CCITT)
    " " ":CCITT"
#  endif
#  if defined(AF_IPX)
    " " ":IPX"
#  endif
#  if defined(AF_NS)
    " " ":NS"
#  endif
#  if defined(AF_ISO)
    " " ":ISO"
#  endif
#  if defined(AF_OSI)
    " " ":OSI"
#  endif
#  if defined(AF_ECMA)
    " " ":ECMA"
#  endif
#  if defined(AF_APPLETALK)
    " " ":APPLETALK"
#  endif
#  if defined(AF_NETROM)
    " " ":NETROM"
#  endif
#  if defined(AF_BRIDGE)
    " " ":BRIDGE"
#  endif
#  if defined(AF_ATMPVC)
    " " ":ATMPVC"
#  endif
#  if defined(AF_X25)
    " " ":X25"
#  endif
#  if defined(AF_INET6)
    " " ":INET6"
#  endif
#  if defined(AF_ROSE)
    " " ":ROSE"
#  endif
#  if defined(AF_DECnet)
    " " ":DECNET"
#  endif
#  if defined(AF_NETBEUI)
    " " ":NETBEUI"
#  endif
#  if defined(AF_SECURITY)
    " " ":SECURITY"
#  endif
#  if defined(AF_KEY)
    " " ":KEY"
#  endif
#  if defined(AF_NETLINK)
    " " ":NETLINK"
#  endif
#  if defined(AF_DLI)
    " " ":DLI"
#  endif
#  if defined(AF_LAT)
    " " ":LAT"
#  endif
#  if defined(AF_HYLINK)
    " " ":HYLINK"
#  endif
#  if defined(AF_BAN)
    " " ":BAN"
#  endif
#  if defined(AF_ROUTE)
    " " ":ROUTE"
#  endif
#  if defined(AF_PACKET)
    " " ":PACKET"
#  endif
#  if defined(AF_ASH)
    " " ":ASH"
#  endif
#  if defined(AF_ECONET)
    " " ":ECONET"
#  endif
#  if defined(AF_ATM)
    " " ":ATM"
#  endif
#  if defined(AF_ATMSVC)
    " " ":ATMSVC"
#  endif
#  if defined(AF_SNA)
    " " ":SNA"
#  endif
#  if defined(AF_IRDA)
    " " ":IRDA"
#  endif
#  if defined(AF_NETBIOS)
    " " ":NETBIOS"
#  endif
#  if defined(AF_VOICEVIEW)
    " " ":VOICEVIEW"
#  endif
#  if defined(AF_PPPOX)
    " " ":PPPOX"
#  endif
#  if defined(AF_WANPIPE)
    " " ":WANPIPE"
#  endif
#  if defined(AF_BLUETOOTH)
    " " ":BLUETOOTH"
#  endif
#  if defined(AF_FIREFOX)
    " " ":FIREFOX"
#  endif
#  if defined(AF_CLUSTER)
    " " ":CLUSTER"
#  endif
#  if defined(AF_12844)
    " " ":12844"
#  endif
#  if defined(AF_NETDES)
    " " ":NETDES"
#  endif
    " " "))"
  },
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  {
    " " "(OR NULL INTEGER (MEMBER"
#  if defined(AI_PASSIVE)
    " " ":PASSIVE"
#  endif
#  if defined(AI_CANONNAME)
    " " ":CANONNAME"
#  endif
#  if defined(AI_NUMERICHOST)
    " " ":NUMERICHOST"
#  endif
#  if defined(AI_NUMERICSERV)
    " " ":NUMERICSERV"
#  endif
#  if defined(AI_V4MAPPED)
    " " ":V4MAPPED"
#  endif
#  if defined(AI_ALL)
    " " ":ALL"
#  endif
#  if defined(AI_ADDRCONFIG)
    " " ":ADDRCONFIG"
#  endif
    " " "))"
  },
#endif
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
  {
    " " "(OR NULL INTEGER (MEMBER"
#  if defined(IFF_UP)
    " " ":UP"
#  endif
#  if defined(IFF_BROADCAST)
    " " ":BROADCAST"
#  endif
#  if defined(IFF_DEBUG)
    " " ":DEBUG"
#  endif
#  if defined(IFF_LOOPBACK)
    " " ":LOOPBACK"
#  endif
#  if defined(IFF_POINTOPOINT)
    " " ":POINTOPOINT"
#  endif
#  if defined(IFF_NOTRAILERS)
    " " ":NOTRAILERS"
#  endif
#  if defined(IFF_RUNNING)
    " " ":RUNNING"
#  endif
#  if defined(IFF_NOARP)
    " " ":NOARP"
#  endif
#  if defined(IFF_PROMISC)
    " " ":PROMISC"
#  endif
#  if defined(IFF_ALLMULTI)
    " " ":ALLMULTI"
#  endif
#  if defined(IFF_OACTIVE)
    " " ":OACTIVE"
#  endif
#  if defined(IFF_SIMPLEX)
    " " ":SIMPLEX"
#  endif
#  if defined(IFF_LINK0)
    " " ":LINK0"
#  endif
#  if defined(IFF_LINK1)
    " " ":LINK1"
#  endif
#  if defined(IFF_LINK2)
    " " ":LINK2"
#  endif
#  if defined(IFF_ALTPHYS)
    " " ":ALTPHYS"
#  endif
#  if defined(IFF_POLLING)
    " " ":POLLING"
#  endif
#  if defined(IFF_PPROMISC)
    " " ":PPROMISC"
#  endif
#  if defined(IFF_MONITOR)
    " " ":MONITOR"
#  endif
#  if defined(IFF_STATICARP)
    " " ":STATICARP"
#  endif
#  if defined(IFF_NEEDSGIANT)
    " " ":NEEDSGIANT"
#  endif
#  if defined(IFF_MASTER)
    " " ":MASTER"
#  endif
#  if defined(IFF_SLAVE)
    " " ":SLAVE"
#  endif
#  if defined(IFF_MULTICAST)
    " " ":MULTICAST"
#  endif
#  if defined(IFF_PORTSEL)
    " " ":PORTSEL"
#  endif
#  if defined(IFF_AUTOMEDIA)
    " " ":AUTOMEDIA"
#  endif
#  if defined(IFF_DYNAMIC)
    " " ":DYNAMIC"
#  endif
#  if defined(IFF_LOWER_UP)
    " " ":LOWER-UP"
#  endif
#  if defined(IFF_DORMANT)
    " " ":DORMANT"
#  endif
    " " "))"
  },
#endif
  {
    " " "(OR NULL INTEGER (MEMBER"
#  if defined(IPPROTO_IP)
    " " ":IPPROTO-IP"
#  endif
#  if defined(IPPROTO_IPV6)
    " " ":IPPROTO-IPV6"
#  endif
#  if defined(IPPROTO_ICMP)
    " " ":IPPROTO-ICMP"
#  endif
#  if defined(IPPROTO_RAW)
    " " ":IPPROTO-RAW"
#  endif
#  if defined(IPPROTO_TCP)
    " " ":IPPROTO-TCP"
#  endif
#  if defined(IPPROTO_UDP)
    " " ":IPPROTO-UDP"
#  endif
#  if defined(IPPROTO_IGMP)
    " " ":IPPROTO-IGMP"
#  endif
#  if defined(IPPROTO_IPIP)
    " " ":IPPROTO-IPIP"
#  endif
#  if defined(IPPROTO_EGP)
    " " ":IPPROTO-EGP"
#  endif
#  if defined(IPPROTO_PUP)
    " " ":IPPROTO-PUP"
#  endif
#  if defined(IPPROTO_IDP)
    " " ":IPPROTO-IDP"
#  endif
#  if defined(IPPROTO_GGP)
    " " ":IPPROTO-GGP"
#  endif
#  if defined(IPPROTO_ND)
    " " ":IPPROTO-ND"
#  endif
#  if defined(IPPROTO_HOPOPTS)
    " " ":IPPROTO-HOPOPTS"
#  endif
#  if defined(IPPROTO_ROUTING)
    " " ":IPPROTO-ROUTING"
#  endif
#  if defined(IPPROTO_FRAGMENT)
    " " ":IPPROTO-FRAGMENT"
#  endif
#  if defined(IPPROTO_ESP)
    " " ":IPPROTO-ESP"
#  endif
#  if defined(IPPROTO_AH)
    " " ":IPPROTO-AH"
#  endif
#  if defined(IPPROTO_ICMPV6)
    " " ":IPPROTO-ICMPV6"
#  endif
#  if defined(IPPROTO_DSTOPTS)
    " " ":IPPROTO-DSTOPTS"
#  endif
#  if defined(IPPROTO_NONE)
    " " ":IPPROTO-NONE"
#  endif
#  if defined(IPPROTO_RSVP)
    " " ":IPPROTO-RSVP"
#  endif
#  if defined(IPPROTO_GRE)
    " " ":IPPROTO-GRE"
#  endif
#  if defined(IPPROTO_PIM)
    " " ":IPPROTO-PIM"
#  endif
#  if defined(IPPROTO_COMP)
    " " ":IPPROTO-COMP"
#  endif
#  if defined(NSPROTO_IPX)
    " " ":NSPROTO-IPX"
#  endif
#  if defined(NSPROTO_SPX)
    " " ":NSPROTO-SPX"
#  endif
#  if defined(NSPROTO_SPXII)
    " " ":NSPROTO-SPXII"
#  endif
#  if defined(NETLINK_ROUTE)
    " " ":NETLINK-ROUTE"
#  endif
#  if defined(NETLINK_USERSOCK)
    " " ":NETLINK-USERSOCK"
#  endif
#  if defined(NETLINK_FIREWALL)
    " " ":NETLINK-FIREWALL"
#  endif
#  if defined(NETLINK_INET_DIAG)
    " " ":NETLINK-INET-DIAG"
#  endif
#  if defined(NETLINK_NFLOG)
    " " ":NETLINK-NFLOG"
#  endif
#  if defined(NETLINK_XFRM)
    " " ":NETLINK-XFRM"
#  endif
#  if defined(NETLINK_SELINUX)
    " " ":NETLINK-SELINUX"
#  endif
#  if defined(NETLINK_ISCSI)
    " " ":NETLINK-ISCSI"
#  endif
#  if defined(NETLINK_AUDIT)
    " " ":NETLINK-AUDIT"
#  endif
#  if defined(NETLINK_FIB_LOOKUP)
    " " ":NETLINK-FIB-LOOKUP"
#  endif
#  if defined(NETLINK_CONNECTOR)
    " " ":NETLINK-CONNECTOR"
#  endif
#  if defined(NETLINK_NETFILTER)
    " " ":NETLINK-NETFILTER"
#  endif
#  if defined(NETLINK_IP6_FW)
    " " ":NETLINK-IP6-FW"
#  endif
#  if defined(NETLINK_DNRTMSG)
    " " ":NETLINK-DNRTMSG"
#  endif
#  if defined(NETLINK_KOBJECT_UEVENT)
    " " ":NETLINK-KOBJECT-UEVENT"
#  endif
#  if defined(NETLINK_GENERIC)
    " " ":NETLINK-GENERIC"
#  endif
#  if defined(NETLINK_SCSITRANSPORT)
    " " ":NETLINK-SCSITRANSPORT"
#  endif
#  if defined(NETLINK_ECRYPTFS)
    " " ":NETLINK-ECRYPTFS"
#  endif
#  if defined(ETH_P_LOOP)
    " " ":ETH-P-LOOP"
#  endif
#  if defined(ETH_P_PUP)
    " " ":ETH-P-PUP"
#  endif
#  if defined(ETH_P_PUPAT)
    " " ":ETH-P-PUPAT"
#  endif
#  if defined(ETH_P_IP)
    " " ":ETH-P-IP"
#  endif
#  if defined(ETH_P_X25)
    " " ":ETH-P-X25"
#  endif
#  if defined(ETH_P_ARP)
    " " ":ETH-P-ARP"
#  endif
#  if defined(ETH_P_BPQ)
    " " ":ETH-P-BPQ"
#  endif
#  if defined(ETH_P_IEEEPUP)
    " " ":ETH-P-IEEEPUP"
#  endif
#  if defined(ETH_P_IEEEPUPAT)
    " " ":ETH-P-IEEEPUPAT"
#  endif
#  if defined(ETH_P_DEC)
    " " ":ETH-P-DEC"
#  endif
#  if defined(ETH_P_DNA_DL)
    " " ":ETH-P-DNA-DL"
#  endif
#  if defined(ETH_P_DNA_RC)
    " " ":ETH-P-DNA-RC"
#  endif
#  if defined(ETH_P_DNA_RT)
    " " ":ETH-P-DNA-RT"
#  endif
#  if defined(ETH_P_LAT)
    " " ":ETH-P-LAT"
#  endif
#  if defined(ETH_P_DIAG)
    " " ":ETH-P-DIAG"
#  endif
#  if defined(ETH_P_CUST)
    " " ":ETH-P-CUST"
#  endif
#  if defined(ETH_P_SCA)
    " " ":ETH-P-SCA"
#  endif
#  if defined(ETH_P_RARP)
    " " ":ETH-P-RARP"
#  endif
#  if defined(ETH_P_ATALK)
    " " ":ETH-P-ATALK"
#  endif
#  if defined(ETH_P_AARP)
    " " ":ETH-P-AARP"
#  endif
#  if defined(ETH_P_IPX)
    " " ":ETH-P-IPX"
#  endif
#  if defined(ETH_P_IPV6)
    " " ":ETH-P-IPV6"
#  endif
#  if defined(ETH_P_PPP_DISC)
    " " ":ETH-P-PPP-DISC"
#  endif
#  if defined(ETH_P_PPP_SES)
    " " ":ETH-P-PPP-SES"
#  endif
#  if defined(ETH_P_ATMMPOA)
    " " ":ETH-P-ATMMPOA"
#  endif
#  if defined(ETH_P_ATMFATE)
    " " ":ETH-P-ATMFATE"
#  endif
#  if defined(ETH_P_802_3)
    " " ":ETH-P-802-3"
#  endif
#  if defined(ETH_P_AX25)
    " " ":ETH-P-AX25"
#  endif
#  if defined(ETH_P_ALL)
    " " ":ETH-P-ALL"
#  endif
#  if defined(ETH_P_802_2)
    " " ":ETH-P-802-2"
#  endif
#  if defined(ETH_P_SNAP)
    " " ":ETH-P-SNAP"
#  endif
#  if defined(ETH_P_DDCMP)
    " " ":ETH-P-DDCMP"
#  endif
#  if defined(ETH_P_WAN_PPP)
    " " ":ETH-P-WAN-PPP"
#  endif
#  if defined(ETH_P_PPP_MP)
    " " ":ETH-P-PPP-MP"
#  endif
#  if defined(ETH_P_LOCALTALK)
    " " ":ETH-P-LOCALTALK"
#  endif
#  if defined(ETH_P_PPPTALK)
    " " ":ETH-P-PPPTALK"
#  endif
#  if defined(ETH_P_TR_802_2)
    " " ":ETH-P-TR-802-2"
#  endif
#  if defined(ETH_P_MOBITEX)
    " " ":ETH-P-MOBITEX"
#  endif
#  if defined(ETH_P_CONTROL)
    " " ":ETH-P-CONTROL"
#  endif
#  if defined(ETH_P_IRDA)
    " " ":ETH-P-IRDA"
#  endif
#  if defined(ETH_P_ECONET)
    " " ":ETH-P-ECONET"
#  endif
    " " "))"
  },
#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
  {
    " " "(OR NULL INTEGER (MEMBER"
#  if defined(MSG_OOB)
    " " ":OOB"
#  endif
#  if defined(MSG_PEEK)
    " " ":PEEK"
#  endif
#  if defined(MSG_DONTROUTE)
    " " ":DONTROUTE"
#  endif
#  if defined(MSG_TRYHARD)
    " " ":TRYHARD"
#  endif
#  if defined(MSG_CTRUNC)
    " " ":CTRUNC"
#  endif
#  if defined(MSG_PROXY)
    " " ":PROXY"
#  endif
#  if defined(MSG_TRUNC)
    " " ":TRUNC"
#  endif
#  if defined(MSG_DONTWAIT)
    " " ":DONTWAIT"
#  endif
#  if defined(MSG_EOR)
    " " ":EOR"
#  endif
#  if defined(MSG_WAITALL)
    " " ":WAITALL"
#  endif
#  if defined(MSG_FIN)
    " " ":FIN"
#  endif
#  if defined(MSG_SYN)
    " " ":SYN"
#  endif
#  if defined(MSG_CONFIRM)
    " " ":CONFIRM"
#  endif
#  if defined(MSG_RST)
    " " ":RST"
#  endif
#  if defined(MSG_ERRQUEUE)
    " " ":ERRQUEUE"
#  endif
#  if defined(MSG_NOSIGNAL)
    " " ":NOSIGNAL"
#  endif
#  if defined(MSG_MORE)
    " " ":MORE"
#  endif
    " " "))"
  },
#endif
  {
    " " "(OR NULL INTEGER (MEMBER"
#  if defined(SOCK_STREAM)
    " " ":STREAM"
#  endif
#  if defined(SOCK_DGRAM)
    " " ":DGRAM"
#  endif
#  if defined(SOCK_RAW)
    " " ":RAW"
#  endif
#  if defined(SOCK_RDM)
    " " ":RDM"
#  endif
#  if defined(SOCK_SEQPACKET)
    " " ":SEQPACKET"
#  endif
#  if defined(SOCK_PACKET)
    " " ":PACKET"
#  endif
    " " "))"
  },
#if defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)
  {
    " " "(OR NULL INTEGER (MEMBER"
#  if defined(SO_DEBUG)
    " " ":DEBUG"
#  endif
#  if defined(SO_ACCEPTCONN)
    " " ":ACCEPTCONN"
#  endif
#  if defined(SO_BROADCAST)
    " " ":BROADCAST"
#  endif
#  if defined(SO_USELOOPBACK)
    " " ":USELOOPBACK"
#  endif
#  if defined(SO_PEERCRED)
    " " ":PEERCRED"
#  endif
#  if defined(SO_REUSEADDR)
    " " ":REUSEADDR"
#  endif
#  if defined(SO_KEEPALIVE)
    " " ":KEEPALIVE"
#  endif
#  if defined(SO_LINGER)
    " " ":LINGER"
#  endif
#  if defined(SO_OOBINLINE)
    " " ":OOBINLINE"
#  endif
#  if defined(SO_SNDBUF)
    " " ":SNDBUF"
#  endif
#  if defined(SO_RCVBUF)
    " " ":RCVBUF"
#  endif
#  if defined(SO_ERROR)
    " " ":ERROR"
#  endif
#  if defined(SO_TYPE)
    " " ":TYPE"
#  endif
#  if defined(SO_DONTROUTE)
    " " ":DONTROUTE"
#  endif
#  if defined(SO_RCVLOWAT)
    " " ":RCVLOWAT"
#  endif
#  if defined(SO_RCVTIMEO)
    " " ":RCVTIMEO"
#  endif
#  if defined(SO_SNDLOWAT)
    " " ":SNDLOWAT"
#  endif
#  if defined(SO_SNDTIMEO)
    " " ":SNDTIMEO"
#  endif
    " " "))"
  },
#endif
#if defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)
  {
    " " "(OR NULL INTEGER (MEMBER"
    " " ":ALL"
#  if defined(SOL_SOCKET)
    " " ":SOL-SOCKET"
#  endif
#  if defined(SOL_IP)
    " " ":SOL-IP"
#  endif
#  if defined(SOL_IPX)
    " " ":SOL-IPX"
#  endif
#  if defined(SOL_AX25)
    " " ":SOL-AX25"
#  endif
#  if defined(SOL_ATALK)
    " " ":SOL-ATALK"
#  endif
#  if defined(SOL_NETROM)
    " " ":SOL-NETROM"
#  endif
#  if defined(SOL_TCP)
    " " ":SOL-TCP"
#  endif
#  if defined(SOL_UDP)
    " " ":SOL-UDP"
#  endif
#  if defined(IPPROTO_IP)
    " " ":IPPROTO-IP"
#  endif
#  if defined(IPPROTO_IPV6)
    " " ":IPPROTO-IPV6"
#  endif
#  if defined(IPPROTO_ICMP)
    " " ":IPPROTO-ICMP"
#  endif
#  if defined(IPPROTO_RAW)
    " " ":IPPROTO-RAW"
#  endif
#  if defined(IPPROTO_TCP)
    " " ":IPPROTO-TCP"
#  endif
#  if defined(IPPROTO_UDP)
    " " ":IPPROTO-UDP"
#  endif
#  if defined(IPPROTO_IGMP)
    " " ":IPPROTO-IGMP"
#  endif
#  if defined(IPPROTO_IPIP)
    " " ":IPPROTO-IPIP"
#  endif
#  if defined(IPPROTO_EGP)
    " " ":IPPROTO-EGP"
#  endif
#  if defined(IPPROTO_PUP)
    " " ":IPPROTO-PUP"
#  endif
#  if defined(IPPROTO_IDP)
    " " ":IPPROTO-IDP"
#  endif
#  if defined(IPPROTO_GGP)
    " " ":IPPROTO-GGP"
#  endif
#  if defined(IPPROTO_ND)
    " " ":IPPROTO-ND"
#  endif
#  if defined(IPPROTO_HOPOPTS)
    " " ":IPPROTO-HOPOPTS"
#  endif
#  if defined(IPPROTO_ROUTING)
    " " ":IPPROTO-ROUTING"
#  endif
#  if defined(IPPROTO_FRAGMENT)
    " " ":IPPROTO-FRAGMENT"
#  endif
#  if defined(IPPROTO_ESP)
    " " ":IPPROTO-ESP"
#  endif
#  if defined(IPPROTO_AH)
    " " ":IPPROTO-AH"
#  endif
#  if defined(IPPROTO_ICMPV6)
    " " ":IPPROTO-ICMPV6"
#  endif
#  if defined(IPPROTO_DSTOPTS)
    " " ":IPPROTO-DSTOPTS"
#  endif
#  if defined(IPPROTO_NONE)
    " " ":IPPROTO-NONE"
#  endif
    " " "))"
  },
#endif
  0
};

struct module__rawsock__subr_tab_t {
  VAROBJECTS_ALIGNMENT_DUMMY_DECL
  subr_t _subr_rawsock_accept;
  subr_t _subr_rawsock_bind;
#if defined(HAVE_NET_IF_H)
  subr_t _subr_rawsock_configdev;
#endif
  subr_t _subr_rawsock_connect;
  subr_t _subr_rawsock_convert_address;
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  subr_t _subr_rawsock_getaddrinfo;
#endif
#if defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)
  subr_t _subr_rawsock_getnameinfo;
#endif
  subr_t _subr_rawsock_getpeername;
  subr_t _subr_rawsock_getsockname;
  subr_t _subr_rawsock_htonl;
  subr_t _subr_rawsock_htons;
  subr_t _subr_rawsock_icmpcsum;
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
  subr_t _subr_rawsock_ifaddrs;
#endif
#if defined(HAVE_NET_IF_H)
  subr_t _subr_rawsock_if_name_index;
#endif
  subr_t _subr_rawsock_ipcsum;
  subr_t _subr_rawsock_make_sockaddr;
#if defined(HAVE_NETDB_H)
  subr_t _subr_rawsock_network;
#endif
  subr_t _subr_rawsock_ntohl;
  subr_t _subr_rawsock_ntohs;
#if defined(HAVE_NETDB_H)
  subr_t _subr_rawsock_protocol;
#endif
  subr_t _subr_rawsock_recv;
  subr_t _subr_rawsock_recvfrom;
#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
  subr_t _subr_rawsock_recvmsg;
#endif
  subr_t _subr_rawsock_send;
#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
  subr_t _subr_rawsock_sendmsg;
#endif
  subr_t _subr_rawsock_sendto;
#if defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)
  subr_t _subr_rawsock_set_socket_option;
#endif
  subr_t _subr_rawsock_sockaddr_family;
  subr_t _subr_rawsock_sockaddr_slot;
#if defined(HAVE_SOCKATMARK)
  subr_t _subr_rawsock_sockatmark;
#endif
  subr_t _subr_rawsock_socket;
  subr_t _subr_rawsock_socketpair;
#if defined(HAVE_GETSOCKOPT) || defined(WIN32_NATIVE)
  subr_t _subr_rawsock_socket_option;
#endif
  subr_t _subr_rawsock_sock_close;
  subr_t _subr_rawsock_sock_listen;
  subr_t _subr_rawsock_sock_read;
  subr_t _subr_rawsock_sock_write;
  subr_t _subr_rawsock_tcpcsum;
  subr_t _subr_rawsock_udpcsum;
  int _dummy_to_avoid_trailing_comma_in_initializer;
};
extern struct module__rawsock__subr_tab_t module__rawsock__subr_tab;

#if defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)
static uintL getnameinfo_flags (void) {
  uintL flags = 0
#  ifdef NI_DGRAM
    | (missingp(STACK_(0)) ? 0 : NI_DGRAM)
#  endif
#  ifdef NI_NUMERICSCOPE
    | (missingp(STACK_(1)) ? 0 : NI_NUMERICSCOPE)
#  endif
#  ifdef NI_NUMERICSERV
    | (missingp(STACK_(2)) ? 0 : NI_NUMERICSERV)
#  endif
#  ifdef NI_NAMEREQD
    | (missingp(STACK_(3)) ? 0 : NI_NAMEREQD)
#  endif
#  ifdef NI_NUMERICHOST
    | (missingp(STACK_(4)) ? 0 : NI_NUMERICHOST)
#  endif
#  ifdef NI_NOFQDN
    | (missingp(STACK_(5)) ? 0 : NI_NOFQDN)
#  endif
   ;
  skipSTACK(6);
  return flags;
}

#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
static uintL addrinfo_flags (void) {
  uintL flags = 0
#  ifdef AI_ADDRCONFIG
    | (missingp(STACK_(0)) ? 0 : AI_ADDRCONFIG)
#  endif
#  ifdef AI_ALL
    | (missingp(STACK_(1)) ? 0 : AI_ALL)
#  endif
#  ifdef AI_V4MAPPED
    | (missingp(STACK_(2)) ? 0 : AI_V4MAPPED)
#  endif
#  ifdef AI_NUMERICSERV
    | (missingp(STACK_(3)) ? 0 : AI_NUMERICSERV)
#  endif
#  ifdef AI_NUMERICHOST
    | (missingp(STACK_(4)) ? 0 : AI_NUMERICHOST)
#  endif
#  ifdef AI_CANONNAME
    | (missingp(STACK_(5)) ? 0 : AI_CANONNAME)
#  endif
#  ifdef AI_PASSIVE
    | (missingp(STACK_(6)) ? 0 : AI_PASSIVE)
#  endif
   ;
  skipSTACK(7);
  return flags;
}

#endif
static uintL recv_flags (void) {
  uintL flags = 0
#  ifdef MSG_WAITALL
    | (missingp(STACK_(0)) ? 0 : MSG_WAITALL)
#  endif
#  ifdef MSG_OOB
    | (missingp(STACK_(1)) ? 0 : MSG_OOB)
#  endif
#  ifdef MSG_PEEK
    | (missingp(STACK_(2)) ? 0 : MSG_PEEK)
#  endif
   ;
  skipSTACK(3);
  return flags;
}

static uintL send_flags (void) {
  uintL flags = 0
#  ifdef MSG_EOR
    | (missingp(STACK_(0)) ? 0 : MSG_EOR)
#  endif
#  ifdef MSG_OOB
    | (missingp(STACK_(1)) ? 0 : MSG_OOB)
#  endif
   ;
  skipSTACK(2);
  return flags;
}

#if defined(HAVE_NET_IF_H)
static uintL configdev_flags (void) {
  uintL flags = 0
#  ifdef IFF_NOARP
    | (missingp(STACK_(0)) ? 0 : IFF_NOARP)
#  endif
#  ifdef IFF_PROMISC
    | (missingp(STACK_(1)) ? 0 : IFF_PROMISC)
#  endif
   ;
  skipSTACK(2);
  return flags;
}

#endif

#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
static const c_lisp_pair_t check_iff_table[] = {
 #ifdef IFF_UP
  { IFF_UP, &(O(object_Kup)) },
 #endif
 #ifdef IFF_BROADCAST
  { IFF_BROADCAST, &(O(object_Kbroadcast)) },
 #endif
 #ifdef IFF_DEBUG
  { IFF_DEBUG, &(O(object_Kdebug)) },
 #endif
 #ifdef IFF_LOOPBACK
  { IFF_LOOPBACK, &(O(object_Kloopback)) },
 #endif
 #ifdef IFF_POINTOPOINT
  { IFF_POINTOPOINT, &(O(object_Kpointopoint)) },
 #endif
 #ifdef IFF_NOTRAILERS
  { IFF_NOTRAILERS, &(O(object_Knotrailers)) },
 #endif
 #ifdef IFF_RUNNING
  { IFF_RUNNING, &(O(object_Krunning)) },
 #endif
 #ifdef IFF_NOARP
  { IFF_NOARP, &(O(object_Knoarp)) },
 #endif
 #ifdef IFF_PROMISC
  { IFF_PROMISC, &(O(object_Kpromisc)) },
 #endif
 #ifdef IFF_ALLMULTI
  { IFF_ALLMULTI, &(O(object_Kallmulti)) },
 #endif
 #ifdef IFF_OACTIVE
  { IFF_OACTIVE, &(O(object_Koactive)) },
 #endif
 #ifdef IFF_SIMPLEX
  { IFF_SIMPLEX, &(O(object_Ksimplex)) },
 #endif
 #ifdef IFF_LINK0
  { IFF_LINK0, &(O(object_Klink0)) },
 #endif
 #ifdef IFF_LINK1
  { IFF_LINK1, &(O(object_Klink1)) },
 #endif
 #ifdef IFF_LINK2
  { IFF_LINK2, &(O(object_Klink2)) },
 #endif
 #ifdef IFF_ALTPHYS
  { IFF_ALTPHYS, &(O(object_Kaltphys)) },
 #endif
 #ifdef IFF_POLLING
  { IFF_POLLING, &(O(object_Kpolling)) },
 #endif
 #ifdef IFF_PPROMISC
  { IFF_PPROMISC, &(O(object_Kppromisc)) },
 #endif
 #ifdef IFF_MONITOR
  { IFF_MONITOR, &(O(object_Kmonitor)) },
 #endif
 #ifdef IFF_STATICARP
  { IFF_STATICARP, &(O(object_Kstaticarp)) },
 #endif
 #ifdef IFF_NEEDSGIANT
  { IFF_NEEDSGIANT, &(O(object_Kneedsgiant)) },
 #endif
 #ifdef IFF_MASTER
  { IFF_MASTER, &(O(object_Kmaster)) },
 #endif
 #ifdef IFF_SLAVE
  { IFF_SLAVE, &(O(object_Kslave)) },
 #endif
 #ifdef IFF_MULTICAST
  { IFF_MULTICAST, &(O(object_Kmulticast)) },
 #endif
 #ifdef IFF_PORTSEL
  { IFF_PORTSEL, &(O(object_Kportsel)) },
 #endif
 #ifdef IFF_AUTOMEDIA
  { IFF_AUTOMEDIA, &(O(object_Kautomedia)) },
 #endif
 #ifdef IFF_DYNAMIC
  { IFF_DYNAMIC, &(O(object_Kdynamic)) },
 #endif
 #ifdef IFF_LOWER_UP
  { IFF_LOWER_UP, &(O(object_Klower_up)) },
 #endif
 #ifdef IFF_DORMANT
  { IFF_DORMANT, &(O(object_Kdormant)) },
 #endif
  { 0, NULL }
};
static const c_lisp_map_t check_iff_map = {
  check_iff_table,
  (sizeof(check_iff_table)/sizeof(c_lisp_pair_t))-1,
  (unsigned)~0,true,
  true,
  "check_iff"
};
#define check_iff(a) (int)map_lisp_to_c(a,&check_iff_map)
#define check_iff_reverse(a) map_c_to_lisp(a,&check_iff_map)
#define check_iff_to_list(a) map_c_to_list(a,&check_iff_map)
#define check_iff_of_list(a) map_list_to_c(a,&check_iff_map)

#endif
static const c_lisp_pair_t check_socket_domain_table[] = {
 #ifdef AF_UNSPEC
  { AF_UNSPEC, &(O(object_Kunspec)) },
 #endif
 #ifdef AF_UNIX
  { AF_UNIX, &(O(object_Kunix)) },
 #endif
 #ifdef AF_LOCAL
  { AF_LOCAL, &(O(object_Klocal)) },
 #endif
 #ifdef AF_INET
  { AF_INET, &(O(object_Kinet)) },
 #endif
 #ifdef AF_IMPLINK
  { AF_IMPLINK, &(O(object_Kimplink)) },
 #endif
 #ifdef AF_PUP
  { AF_PUP, &(O(object_Kpup)) },
 #endif
 #ifdef AF_CHAOS
  { AF_CHAOS, &(O(object_Kchaos)) },
 #endif
 #ifdef AF_AX25
  { AF_AX25, &(O(object_Kax25)) },
 #endif
 #ifdef AF_DATAKIT
  { AF_DATAKIT, &(O(object_Kdatakit)) },
 #endif
 #ifdef AF_CCITT
  { AF_CCITT, &(O(object_Kccitt)) },
 #endif
 #ifdef AF_IPX
  { AF_IPX, &(O(object_Kipx)) },
 #endif
 #ifdef AF_NS
  { AF_NS, &(O(object_Kns)) },
 #endif
 #ifdef AF_ISO
  { AF_ISO, &(O(object_Kiso)) },
 #endif
 #ifdef AF_OSI
  { AF_OSI, &(O(object_Kosi)) },
 #endif
 #ifdef AF_ECMA
  { AF_ECMA, &(O(object_Kecma)) },
 #endif
 #ifdef AF_APPLETALK
  { AF_APPLETALK, &(O(object_Kappletalk)) },
 #endif
 #ifdef AF_NETROM
  { AF_NETROM, &(O(object_Knetrom)) },
 #endif
 #ifdef AF_BRIDGE
  { AF_BRIDGE, &(O(object_Kbridge)) },
 #endif
 #ifdef AF_ATMPVC
  { AF_ATMPVC, &(O(object_Katmpvc)) },
 #endif
 #ifdef AF_X25
  { AF_X25, &(O(object_Kx25)) },
 #endif
 #ifdef AF_INET6
  { AF_INET6, &(O(object_Kinet6)) },
 #endif
 #ifdef AF_ROSE
  { AF_ROSE, &(O(object_Krose)) },
 #endif
 #ifdef AF_DECnet
  { AF_DECnet, &(O(object_Kdecnet)) },
 #endif
 #ifdef AF_NETBEUI
  { AF_NETBEUI, &(O(object_Knetbeui)) },
 #endif
 #ifdef AF_SECURITY
  { AF_SECURITY, &(O(object_Ksecurity)) },
 #endif
 #ifdef AF_KEY
  { AF_KEY, &(O(object_Kkey)) },
 #endif
 #ifdef AF_NETLINK
  { AF_NETLINK, &(O(object_Knetlink)) },
 #endif
 #ifdef AF_DLI
  { AF_DLI, &(O(object_Kdli)) },
 #endif
 #ifdef AF_LAT
  { AF_LAT, &(O(object_Klat)) },
 #endif
 #ifdef AF_HYLINK
  { AF_HYLINK, &(O(object_Khylink)) },
 #endif
 #ifdef AF_BAN
  { AF_BAN, &(O(object_Kban)) },
 #endif
 #ifdef AF_ROUTE
  { AF_ROUTE, &(O(object_Kroute)) },
 #endif
 #ifdef AF_PACKET
  { AF_PACKET, &(O(object_Kpacket)) },
 #endif
 #ifdef AF_ASH
  { AF_ASH, &(O(object_Kash)) },
 #endif
 #ifdef AF_ECONET
  { AF_ECONET, &(O(object_Keconet)) },
 #endif
 #ifdef AF_ATM
  { AF_ATM, &(O(object_Katm)) },
 #endif
 #ifdef AF_ATMSVC
  { AF_ATMSVC, &(O(object_Katmsvc)) },
 #endif
 #ifdef AF_SNA
  { AF_SNA, &(O(object_Ksna)) },
 #endif
 #ifdef AF_IRDA
  { AF_IRDA, &(O(object_Kirda)) },
 #endif
 #ifdef AF_NETBIOS
  { AF_NETBIOS, &(O(object_Knetbios)) },
 #endif
 #ifdef AF_VOICEVIEW
  { AF_VOICEVIEW, &(O(object_Kvoiceview)) },
 #endif
 #ifdef AF_PPPOX
  { AF_PPPOX, &(O(object_Kpppox)) },
 #endif
 #ifdef AF_WANPIPE
  { AF_WANPIPE, &(O(object_Kwanpipe)) },
 #endif
 #ifdef AF_BLUETOOTH
  { AF_BLUETOOTH, &(O(object_Kbluetooth)) },
 #endif
 #ifdef AF_FIREFOX
  { AF_FIREFOX, &(O(object_Kfirefox)) },
 #endif
 #ifdef AF_CLUSTER
  { AF_CLUSTER, &(O(object_Kcluster)) },
 #endif
 #ifdef AF_12844
  { AF_12844, &(O(object_K12844)) },
 #endif
 #ifdef AF_NETDES
  { AF_NETDES, &(O(object_Knetdes)) },
 #endif
  { 0, NULL }
};
static const c_lisp_map_t check_socket_domain_map = {
  check_socket_domain_table,
  (sizeof(check_socket_domain_table)/sizeof(c_lisp_pair_t))-1,
# if defined(AF_UNSPEC)
  AF_UNSPEC,true,
# else
  0,false,
# endif
  true,
  "check_socket_domain"
};
#define check_socket_domain(a) (int)map_lisp_to_c(a,&check_socket_domain_map)
#define check_socket_domain_reverse(a) map_c_to_lisp(a,&check_socket_domain_map)

static const c_lisp_pair_t check_socket_type_table[] = {
 #ifdef SOCK_STREAM
  { SOCK_STREAM, &(O(object_Kstream)) },
 #endif
 #ifdef SOCK_DGRAM
  { SOCK_DGRAM, &(O(object_Kdgram)) },
 #endif
 #ifdef SOCK_RAW
  { SOCK_RAW, &(O(object_Kraw)) },
 #endif
 #ifdef SOCK_RDM
  { SOCK_RDM, &(O(object_Krdm)) },
 #endif
 #ifdef SOCK_SEQPACKET
  { SOCK_SEQPACKET, &(O(object_Kseqpacket)) },
 #endif
 #ifdef SOCK_PACKET
  { SOCK_PACKET, &(O(object_Kpacket)) },
 #endif
  { 0, NULL }
};
static const c_lisp_map_t check_socket_type_map = {
  check_socket_type_table,
  (sizeof(check_socket_type_table)/sizeof(c_lisp_pair_t))-1,
  0,true,
  true,
  "check_socket_type"
};
#define check_socket_type(a) (int)map_lisp_to_c(a,&check_socket_type_map)
#define check_socket_type_reverse(a) map_c_to_lisp(a,&check_socket_type_map)

static const c_lisp_pair_t check_socket_protocol_table[] = {
 #ifdef IPPROTO_IP
  { IPPROTO_IP, &(O(object_Kipproto_ip)) },
 #endif
 #ifdef IPPROTO_IPV6
  { IPPROTO_IPV6, &(O(object_Kipproto_ipv6)) },
 #endif
 #ifdef IPPROTO_ICMP
  { IPPROTO_ICMP, &(O(object_Kipproto_icmp)) },
 #endif
 #ifdef IPPROTO_RAW
  { IPPROTO_RAW, &(O(object_Kipproto_raw)) },
 #endif
 #ifdef IPPROTO_TCP
  { IPPROTO_TCP, &(O(object_Kipproto_tcp)) },
 #endif
 #ifdef IPPROTO_UDP
  { IPPROTO_UDP, &(O(object_Kipproto_udp)) },
 #endif
 #ifdef IPPROTO_IGMP
  { IPPROTO_IGMP, &(O(object_Kipproto_igmp)) },
 #endif
 #ifdef IPPROTO_IPIP
  { IPPROTO_IPIP, &(O(object_Kipproto_ipip)) },
 #endif
 #ifdef IPPROTO_EGP
  { IPPROTO_EGP, &(O(object_Kipproto_egp)) },
 #endif
 #ifdef IPPROTO_PUP
  { IPPROTO_PUP, &(O(object_Kipproto_pup)) },
 #endif
 #ifdef IPPROTO_IDP
  { IPPROTO_IDP, &(O(object_Kipproto_idp)) },
 #endif
 #ifdef IPPROTO_GGP
  { IPPROTO_GGP, &(O(object_Kipproto_ggp)) },
 #endif
 #ifdef IPPROTO_ND
  { IPPROTO_ND, &(O(object_Kipproto_nd)) },
 #endif
 #ifdef IPPROTO_HOPOPTS
  { IPPROTO_HOPOPTS, &(O(object_Kipproto_hopopts)) },
 #endif
 #ifdef IPPROTO_ROUTING
  { IPPROTO_ROUTING, &(O(object_Kipproto_routing)) },
 #endif
 #ifdef IPPROTO_FRAGMENT
  { IPPROTO_FRAGMENT, &(O(object_Kipproto_fragment)) },
 #endif
 #ifdef IPPROTO_ESP
  { IPPROTO_ESP, &(O(object_Kipproto_esp)) },
 #endif
 #ifdef IPPROTO_AH
  { IPPROTO_AH, &(O(object_Kipproto_ah)) },
 #endif
 #ifdef IPPROTO_ICMPV6
  { IPPROTO_ICMPV6, &(O(object_Kipproto_icmpv6)) },
 #endif
 #ifdef IPPROTO_DSTOPTS
  { IPPROTO_DSTOPTS, &(O(object_Kipproto_dstopts)) },
 #endif
 #ifdef IPPROTO_NONE
  { IPPROTO_NONE, &(O(object_Kipproto_none)) },
 #endif
 #ifdef IPPROTO_RSVP
  { IPPROTO_RSVP, &(O(object_Kipproto_rsvp)) },
 #endif
 #ifdef IPPROTO_GRE
  { IPPROTO_GRE, &(O(object_Kipproto_gre)) },
 #endif
 #ifdef IPPROTO_PIM
  { IPPROTO_PIM, &(O(object_Kipproto_pim)) },
 #endif
 #ifdef IPPROTO_COMP
  { IPPROTO_COMP, &(O(object_Kipproto_comp)) },
 #endif
 #ifdef NSPROTO_IPX
  { NSPROTO_IPX, &(O(object_Knsproto_ipx)) },
 #endif
 #ifdef NSPROTO_SPX
  { NSPROTO_SPX, &(O(object_Knsproto_spx)) },
 #endif
 #ifdef NSPROTO_SPXII
  { NSPROTO_SPXII, &(O(object_Knsproto_spxii)) },
 #endif
 #ifdef NETLINK_ROUTE
  { NETLINK_ROUTE, &(O(object_Knetlink_route)) },
 #endif
 #ifdef NETLINK_USERSOCK
  { NETLINK_USERSOCK, &(O(object_Knetlink_usersock)) },
 #endif
 #ifdef NETLINK_FIREWALL
  { NETLINK_FIREWALL, &(O(object_Knetlink_firewall)) },
 #endif
 #ifdef NETLINK_INET_DIAG
  { NETLINK_INET_DIAG, &(O(object_Knetlink_inet_diag)) },
 #endif
 #ifdef NETLINK_NFLOG
  { NETLINK_NFLOG, &(O(object_Knetlink_nflog)) },
 #endif
 #ifdef NETLINK_XFRM
  { NETLINK_XFRM, &(O(object_Knetlink_xfrm)) },
 #endif
 #ifdef NETLINK_SELINUX
  { NETLINK_SELINUX, &(O(object_Knetlink_selinux)) },
 #endif
 #ifdef NETLINK_ISCSI
  { NETLINK_ISCSI, &(O(object_Knetlink_iscsi)) },
 #endif
 #ifdef NETLINK_AUDIT
  { NETLINK_AUDIT, &(O(object_Knetlink_audit)) },
 #endif
 #ifdef NETLINK_FIB_LOOKUP
  { NETLINK_FIB_LOOKUP, &(O(object_Knetlink_fib_lookup)) },
 #endif
 #ifdef NETLINK_CONNECTOR
  { NETLINK_CONNECTOR, &(O(object_Knetlink_connector)) },
 #endif
 #ifdef NETLINK_NETFILTER
  { NETLINK_NETFILTER, &(O(object_Knetlink_netfilter)) },
 #endif
 #ifdef NETLINK_IP6_FW
  { NETLINK_IP6_FW, &(O(object_Knetlink_ip6_fw)) },
 #endif
 #ifdef NETLINK_DNRTMSG
  { NETLINK_DNRTMSG, &(O(object_Knetlink_dnrtmsg)) },
 #endif
 #ifdef NETLINK_KOBJECT_UEVENT
  { NETLINK_KOBJECT_UEVENT, &(O(object_Knetlink_kobject_uevent)) },
 #endif
 #ifdef NETLINK_GENERIC
  { NETLINK_GENERIC, &(O(object_Knetlink_generic)) },
 #endif
 #ifdef NETLINK_SCSITRANSPORT
  { NETLINK_SCSITRANSPORT, &(O(object_Knetlink_scsitransport)) },
 #endif
 #ifdef NETLINK_ECRYPTFS
  { NETLINK_ECRYPTFS, &(O(object_Knetlink_ecryptfs)) },
 #endif
 #ifdef ETH_P_LOOP
  { ETH_P_LOOP, &(O(object_Keth_p_loop)) },
 #endif
 #ifdef ETH_P_PUP
  { ETH_P_PUP, &(O(object_Keth_p_pup)) },
 #endif
 #ifdef ETH_P_PUPAT
  { ETH_P_PUPAT, &(O(object_Keth_p_pupat)) },
 #endif
 #ifdef ETH_P_IP
  { ETH_P_IP, &(O(object_Keth_p_ip)) },
 #endif
 #ifdef ETH_P_X25
  { ETH_P_X25, &(O(object_Keth_p_x25)) },
 #endif
 #ifdef ETH_P_ARP
  { ETH_P_ARP, &(O(object_Keth_p_arp)) },
 #endif
 #ifdef ETH_P_BPQ
  { ETH_P_BPQ, &(O(object_Keth_p_bpq)) },
 #endif
 #ifdef ETH_P_IEEEPUP
  { ETH_P_IEEEPUP, &(O(object_Keth_p_ieeepup)) },
 #endif
 #ifdef ETH_P_IEEEPUPAT
  { ETH_P_IEEEPUPAT, &(O(object_Keth_p_ieeepupat)) },
 #endif
 #ifdef ETH_P_DEC
  { ETH_P_DEC, &(O(object_Keth_p_dec)) },
 #endif
 #ifdef ETH_P_DNA_DL
  { ETH_P_DNA_DL, &(O(object_Keth_p_dna_dl)) },
 #endif
 #ifdef ETH_P_DNA_RC
  { ETH_P_DNA_RC, &(O(object_Keth_p_dna_rc)) },
 #endif
 #ifdef ETH_P_DNA_RT
  { ETH_P_DNA_RT, &(O(object_Keth_p_dna_rt)) },
 #endif
 #ifdef ETH_P_LAT
  { ETH_P_LAT, &(O(object_Keth_p_lat)) },
 #endif
 #ifdef ETH_P_DIAG
  { ETH_P_DIAG, &(O(object_Keth_p_diag)) },
 #endif
 #ifdef ETH_P_CUST
  { ETH_P_CUST, &(O(object_Keth_p_cust)) },
 #endif
 #ifdef ETH_P_SCA
  { ETH_P_SCA, &(O(object_Keth_p_sca)) },
 #endif
 #ifdef ETH_P_RARP
  { ETH_P_RARP, &(O(object_Keth_p_rarp)) },
 #endif
 #ifdef ETH_P_ATALK
  { ETH_P_ATALK, &(O(object_Keth_p_atalk)) },
 #endif
 #ifdef ETH_P_AARP
  { ETH_P_AARP, &(O(object_Keth_p_aarp)) },
 #endif
 #ifdef ETH_P_IPX
  { ETH_P_IPX, &(O(object_Keth_p_ipx)) },
 #endif
 #ifdef ETH_P_IPV6
  { ETH_P_IPV6, &(O(object_Keth_p_ipv6)) },
 #endif
 #ifdef ETH_P_PPP_DISC
  { ETH_P_PPP_DISC, &(O(object_Keth_p_ppp_disc)) },
 #endif
 #ifdef ETH_P_PPP_SES
  { ETH_P_PPP_SES, &(O(object_Keth_p_ppp_ses)) },
 #endif
 #ifdef ETH_P_ATMMPOA
  { ETH_P_ATMMPOA, &(O(object_Keth_p_atmmpoa)) },
 #endif
 #ifdef ETH_P_ATMFATE
  { ETH_P_ATMFATE, &(O(object_Keth_p_atmfate)) },
 #endif
 #ifdef ETH_P_802_3
  { ETH_P_802_3, &(O(object_Keth_p_802_3)) },
 #endif
 #ifdef ETH_P_AX25
  { ETH_P_AX25, &(O(object_Keth_p_ax25)) },
 #endif
 #ifdef ETH_P_ALL
  { ETH_P_ALL, &(O(object_Keth_p_all)) },
 #endif
 #ifdef ETH_P_802_2
  { ETH_P_802_2, &(O(object_Keth_p_802_2)) },
 #endif
 #ifdef ETH_P_SNAP
  { ETH_P_SNAP, &(O(object_Keth_p_snap)) },
 #endif
 #ifdef ETH_P_DDCMP
  { ETH_P_DDCMP, &(O(object_Keth_p_ddcmp)) },
 #endif
 #ifdef ETH_P_WAN_PPP
  { ETH_P_WAN_PPP, &(O(object_Keth_p_wan_ppp)) },
 #endif
 #ifdef ETH_P_PPP_MP
  { ETH_P_PPP_MP, &(O(object_Keth_p_ppp_mp)) },
 #endif
 #ifdef ETH_P_LOCALTALK
  { ETH_P_LOCALTALK, &(O(object_Keth_p_localtalk)) },
 #endif
 #ifdef ETH_P_PPPTALK
  { ETH_P_PPPTALK, &(O(object_Keth_p_ppptalk)) },
 #endif
 #ifdef ETH_P_TR_802_2
  { ETH_P_TR_802_2, &(O(object_Keth_p_tr_802_2)) },
 #endif
 #ifdef ETH_P_MOBITEX
  { ETH_P_MOBITEX, &(O(object_Keth_p_mobitex)) },
 #endif
 #ifdef ETH_P_CONTROL
  { ETH_P_CONTROL, &(O(object_Keth_p_control)) },
 #endif
 #ifdef ETH_P_IRDA
  { ETH_P_IRDA, &(O(object_Keth_p_irda)) },
 #endif
 #ifdef ETH_P_ECONET
  { ETH_P_ECONET, &(O(object_Keth_p_econet)) },
 #endif
  { 0, NULL }
};
static const c_lisp_map_t check_socket_protocol_map = {
  check_socket_protocol_table,
  (sizeof(check_socket_protocol_table)/sizeof(c_lisp_pair_t))-1,
  0,true,
  true,
  "check_socket_protocol"
};
#define check_socket_protocol(a) (int)map_lisp_to_c(a,&check_socket_protocol_map)
#define check_socket_protocol_reverse(a) map_c_to_lisp(a,&check_socket_protocol_map)

#if defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)
static const c_lisp_pair_t check_gai_ecode_table[] = {
 #ifdef EAI_AGAIN
  { EAI_AGAIN, &(O(object_Kagain)) },
 #endif
 #ifdef EAI_BADFLAGS
  { EAI_BADFLAGS, &(O(object_Kbadflags)) },
 #endif
 #ifdef EAI_FAIL
  { EAI_FAIL, &(O(object_Kfail)) },
 #endif
 #ifdef EAI_FAMILY
  { EAI_FAMILY, &(O(object_Kfamily)) },
 #endif
 #ifdef EAI_MEMORY
  { EAI_MEMORY, &(O(object_Kmemory)) },
 #endif
 #ifdef EAI_NONAME
  { EAI_NONAME, &(O(object_Knoname)) },
 #endif
 #ifdef EAI_OVERFLOW
  { EAI_OVERFLOW, &(O(object_Koverflow)) },
 #endif
 #ifdef EAI_SERVICE
  { EAI_SERVICE, &(O(object_Kservice)) },
 #endif
 #ifdef EAI_SOCKTYPE
  { EAI_SOCKTYPE, &(O(object_Ksocktype)) },
 #endif
 #ifdef EAI_SYSTEM
  { EAI_SYSTEM, &(O(object_Ksystem)) },
 #endif
 #ifdef EAI_NODATA
  { EAI_NODATA, &(O(object_Knodata)) },
 #endif
 #ifdef EAI_ADDRFAMILY
  { EAI_ADDRFAMILY, &(O(object_Kaddrfamily)) },
 #endif
 #ifdef EAI_INPROGRESS
  { EAI_INPROGRESS, &(O(object_Kinprogress)) },
 #endif
 #ifdef EAI_CANCELED
  { EAI_CANCELED, &(O(object_Kcanceled)) },
 #endif
 #ifdef EAI_NOTCANCELED
  { EAI_NOTCANCELED, &(O(object_Knotcanceled)) },
 #endif
 #ifdef EAI_INTR
  { EAI_INTR, &(O(object_Kintr)) },
 #endif
 #ifdef EAI_IDN_ENCODE
  { EAI_IDN_ENCODE, &(O(object_Kidn_encode)) },
 #endif
  { 0, NULL }
};
static const c_lisp_map_t check_gai_ecode_map = {
  check_gai_ecode_table,
  (sizeof(check_gai_ecode_table)/sizeof(c_lisp_pair_t))-1,
  0,true,
  true,
  "check_gai_ecode"
};
#define check_gai_ecode(a) (int)map_lisp_to_c(a,&check_gai_ecode_map)
#define check_gai_ecode_reverse(a) map_c_to_lisp(a,&check_gai_ecode_map)

#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
static const c_lisp_pair_t check_addrinfo_flags_table[] = {
 #ifdef AI_PASSIVE
  { AI_PASSIVE, &(O(object_Kpassive)) },
 #endif
 #ifdef AI_CANONNAME
  { AI_CANONNAME, &(O(object_Kcanonname)) },
 #endif
 #ifdef AI_NUMERICHOST
  { AI_NUMERICHOST, &(O(object_Knumerichost)) },
 #endif
 #ifdef AI_NUMERICSERV
  { AI_NUMERICSERV, &(O(object_Knumericserv)) },
 #endif
 #ifdef AI_V4MAPPED
  { AI_V4MAPPED, &(O(object_Kv4mapped)) },
 #endif
 #ifdef AI_ALL
  { AI_ALL, &(O(object_Kall)) },
 #endif
 #ifdef AI_ADDRCONFIG
  { AI_ADDRCONFIG, &(O(object_Kaddrconfig)) },
 #endif
  { 0, NULL }
};
static const c_lisp_map_t check_addrinfo_flags_map = {
  check_addrinfo_flags_table,
  (sizeof(check_addrinfo_flags_table)/sizeof(c_lisp_pair_t))-1,
  0,true,
  true,
  "check_addrinfo_flags"
};
#define check_addrinfo_flags(a) (int)map_lisp_to_c(a,&check_addrinfo_flags_map)
#define check_addrinfo_flags_reverse(a) map_c_to_lisp(a,&check_addrinfo_flags_map)
#define check_addrinfo_flags_to_list(a) map_c_to_list(a,&check_addrinfo_flags_map)
#define check_addrinfo_flags_of_list(a) map_list_to_c(a,&check_addrinfo_flags_map)

#endif
#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
static const c_lisp_pair_t check_msg_flags_table[] = {
 #ifdef MSG_OOB
  { MSG_OOB, &(O(object_Koob)) },
 #endif
 #ifdef MSG_PEEK
  { MSG_PEEK, &(O(object_Kpeek)) },
 #endif
 #ifdef MSG_DONTROUTE
  { MSG_DONTROUTE, &(O(object_Kdontroute)) },
 #endif
 #ifdef MSG_TRYHARD
  { MSG_TRYHARD, &(O(object_Ktryhard)) },
 #endif
 #ifdef MSG_CTRUNC
  { MSG_CTRUNC, &(O(object_Kctrunc)) },
 #endif
 #ifdef MSG_PROXY
  { MSG_PROXY, &(O(object_Kproxy)) },
 #endif
 #ifdef MSG_TRUNC
  { MSG_TRUNC, &(O(object_Ktrunc)) },
 #endif
 #ifdef MSG_DONTWAIT
  { MSG_DONTWAIT, &(O(object_Kdontwait)) },
 #endif
 #ifdef MSG_EOR
  { MSG_EOR, &(O(object_Keor)) },
 #endif
 #ifdef MSG_WAITALL
  { MSG_WAITALL, &(O(object_Kwaitall)) },
 #endif
 #ifdef MSG_FIN
  { MSG_FIN, &(O(object_Kfin)) },
 #endif
 #ifdef MSG_SYN
  { MSG_SYN, &(O(object_Ksyn)) },
 #endif
 #ifdef MSG_CONFIRM
  { MSG_CONFIRM, &(O(object_Kconfirm)) },
 #endif
 #ifdef MSG_RST
  { MSG_RST, &(O(object_Krst)) },
 #endif
 #ifdef MSG_ERRQUEUE
  { MSG_ERRQUEUE, &(O(object_Kerrqueue)) },
 #endif
 #ifdef MSG_NOSIGNAL
  { MSG_NOSIGNAL, &(O(object_Knosignal)) },
 #endif
 #ifdef MSG_MORE
  { MSG_MORE, &(O(object_Kmore)) },
 #endif
  { 0, NULL }
};
static const c_lisp_map_t check_msg_flags_map = {
  check_msg_flags_table,
  (sizeof(check_msg_flags_table)/sizeof(c_lisp_pair_t))-1,
  0,true,
  true,
  "check_msg_flags"
};
#define check_msg_flags(a) (int)map_lisp_to_c(a,&check_msg_flags_map)
#define check_msg_flags_reverse(a) map_c_to_lisp(a,&check_msg_flags_map)
#define check_msg_flags_to_list(a) map_c_to_list(a,&check_msg_flags_map)
#define check_msg_flags_of_list(a) map_list_to_c(a,&check_msg_flags_map)

#endif
#if defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)
static const c_lisp_pair_t sockopt_level_table[] = {
  { -1, &(O(object_Kall)) },
 #ifdef SOL_SOCKET
  { SOL_SOCKET, &(O(object_Ksol_socket)) },
 #endif
 #ifdef SOL_IP
  { SOL_IP, &(O(object_Ksol_ip)) },
 #endif
 #ifdef SOL_IPX
  { SOL_IPX, &(O(object_Ksol_ipx)) },
 #endif
 #ifdef SOL_AX25
  { SOL_AX25, &(O(object_Ksol_ax25)) },
 #endif
 #ifdef SOL_ATALK
  { SOL_ATALK, &(O(object_Ksol_atalk)) },
 #endif
 #ifdef SOL_NETROM
  { SOL_NETROM, &(O(object_Ksol_netrom)) },
 #endif
 #ifdef SOL_TCP
  { SOL_TCP, &(O(object_Ksol_tcp)) },
 #endif
 #ifdef SOL_UDP
  { SOL_UDP, &(O(object_Ksol_udp)) },
 #endif
 #ifdef IPPROTO_IP
  { IPPROTO_IP, &(O(object_Kipproto_ip)) },
 #endif
 #ifdef IPPROTO_IPV6
  { IPPROTO_IPV6, &(O(object_Kipproto_ipv6)) },
 #endif
 #ifdef IPPROTO_ICMP
  { IPPROTO_ICMP, &(O(object_Kipproto_icmp)) },
 #endif
 #ifdef IPPROTO_RAW
  { IPPROTO_RAW, &(O(object_Kipproto_raw)) },
 #endif
 #ifdef IPPROTO_TCP
  { IPPROTO_TCP, &(O(object_Kipproto_tcp)) },
 #endif
 #ifdef IPPROTO_UDP
  { IPPROTO_UDP, &(O(object_Kipproto_udp)) },
 #endif
 #ifdef IPPROTO_IGMP
  { IPPROTO_IGMP, &(O(object_Kipproto_igmp)) },
 #endif
 #ifdef IPPROTO_IPIP
  { IPPROTO_IPIP, &(O(object_Kipproto_ipip)) },
 #endif
 #ifdef IPPROTO_EGP
  { IPPROTO_EGP, &(O(object_Kipproto_egp)) },
 #endif
 #ifdef IPPROTO_PUP
  { IPPROTO_PUP, &(O(object_Kipproto_pup)) },
 #endif
 #ifdef IPPROTO_IDP
  { IPPROTO_IDP, &(O(object_Kipproto_idp)) },
 #endif
 #ifdef IPPROTO_GGP
  { IPPROTO_GGP, &(O(object_Kipproto_ggp)) },
 #endif
 #ifdef IPPROTO_ND
  { IPPROTO_ND, &(O(object_Kipproto_nd)) },
 #endif
 #ifdef IPPROTO_HOPOPTS
  { IPPROTO_HOPOPTS, &(O(object_Kipproto_hopopts)) },
 #endif
 #ifdef IPPROTO_ROUTING
  { IPPROTO_ROUTING, &(O(object_Kipproto_routing)) },
 #endif
 #ifdef IPPROTO_FRAGMENT
  { IPPROTO_FRAGMENT, &(O(object_Kipproto_fragment)) },
 #endif
 #ifdef IPPROTO_ESP
  { IPPROTO_ESP, &(O(object_Kipproto_esp)) },
 #endif
 #ifdef IPPROTO_AH
  { IPPROTO_AH, &(O(object_Kipproto_ah)) },
 #endif
 #ifdef IPPROTO_ICMPV6
  { IPPROTO_ICMPV6, &(O(object_Kipproto_icmpv6)) },
 #endif
 #ifdef IPPROTO_DSTOPTS
  { IPPROTO_DSTOPTS, &(O(object_Kipproto_dstopts)) },
 #endif
 #ifdef IPPROTO_NONE
  { IPPROTO_NONE, &(O(object_Kipproto_none)) },
 #endif
  { 0, NULL }
};
static const c_lisp_map_t sockopt_level_map = {
  sockopt_level_table,
  (sizeof(sockopt_level_table)/sizeof(c_lisp_pair_t))-1,
# if defined(SOL_SOCKET)
  SOL_SOCKET,true,
# else
  0,false,
# endif
  true,
  "sockopt_level"
};
#define sockopt_level(a) (int)map_lisp_to_c(a,&sockopt_level_map)
#define sockopt_level_reverse(a) map_c_to_lisp(a,&sockopt_level_map)

#endif
#if defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)
static const c_lisp_pair_t sockopt_name_table[] = {
 #ifdef SO_DEBUG
  { SO_DEBUG, &(O(object_Kdebug)) },
 #endif
 #ifdef SO_ACCEPTCONN
  { SO_ACCEPTCONN, &(O(object_Kacceptconn)) },
 #endif
 #ifdef SO_BROADCAST
  { SO_BROADCAST, &(O(object_Kbroadcast)) },
 #endif
 #ifdef SO_USELOOPBACK
  { SO_USELOOPBACK, &(O(object_Kuseloopback)) },
 #endif
 #ifdef SO_PEERCRED
  { SO_PEERCRED, &(O(object_Kpeercred)) },
 #endif
 #ifdef SO_REUSEADDR
  { SO_REUSEADDR, &(O(object_Kreuseaddr)) },
 #endif
 #ifdef SO_KEEPALIVE
  { SO_KEEPALIVE, &(O(object_Kkeepalive)) },
 #endif
 #ifdef SO_LINGER
  { SO_LINGER, &(O(object_Klinger)) },
 #endif
 #ifdef SO_OOBINLINE
  { SO_OOBINLINE, &(O(object_Koobinline)) },
 #endif
 #ifdef SO_SNDBUF
  { SO_SNDBUF, &(O(object_Ksndbuf)) },
 #endif
 #ifdef SO_RCVBUF
  { SO_RCVBUF, &(O(object_Krcvbuf)) },
 #endif
 #ifdef SO_ERROR
  { SO_ERROR, &(O(object_Kerror)) },
 #endif
 #ifdef SO_TYPE
  { SO_TYPE, &(O(object_Ktype)) },
 #endif
 #ifdef SO_DONTROUTE
  { SO_DONTROUTE, &(O(object_Kdontroute)) },
 #endif
 #ifdef SO_RCVLOWAT
  { SO_RCVLOWAT, &(O(object_Krcvlowat)) },
 #endif
 #ifdef SO_RCVTIMEO
  { SO_RCVTIMEO, &(O(object_Krcvtimeo)) },
 #endif
 #ifdef SO_SNDLOWAT
  { SO_SNDLOWAT, &(O(object_Ksndlowat)) },
 #endif
 #ifdef SO_SNDTIMEO
  { SO_SNDTIMEO, &(O(object_Ksndtimeo)) },
 #endif
  { 0, NULL }
};
static const c_lisp_map_t sockopt_name_map = {
  sockopt_name_table,
  (sizeof(sockopt_name_table)/sizeof(c_lisp_pair_t))-1,
  -1,true,
  true,
  "sockopt_name"
};
#define sockopt_name(a) (int)map_lisp_to_c(a,&sockopt_name_map)
#define sockopt_name_reverse(a) map_c_to_lisp(a,&sockopt_name_map)

#endif

#line 95

/* ================== helpers ================== */
/* DANGER: the return value is invalidated by GC! only used by with_buffer_arg
 <> *arg_: vector; on return: simple byte vector, to be pinned
 > STACK_0, STACK_1: END & START -- removed
 > prot: PROT_READ or PROT_READ_WRITE
 < size: how many bytes to use
 < pointer to the buffer start
 removes 2 elements from STACK
 can trigger GC */
static void* parse_buffer_arg (gcv_object_t *arg_, size_t *size, int prot) {
  stringarg sa;
  *arg_ = check_byte_vector(*arg_);
  sa.offset = 0; sa.len = vector_length(*arg_);
  sa.string = *arg_ = array_displace_check(*arg_,sa.len,&sa.offset);
  test_vector_limits(&sa);
  *size = sa.len;
  { void *start_address =
      (void*)(TheSbvector(sa.string)->data + sa.offset + sa.index);
    handle_fault_range(prot,(aint)start_address,(aint)start_address + sa.len);
    return start_address;
  }
}
#line 121
#define with_buffer_arg(_buffer,_arg_,_size,_prot,_code)  do {       void *_buffer = parse_buffer_arg(_arg_,_size,_prot);             with_pinned_varobject(*_arg_,_code);                           } while(0)

/* DANGER: the return value is invalidated by GC! only used by with_sockaddr_arg
 > type: the expected type
 > arg: the argument
 < size: the data size
 > prot: PROT_READ or PROT_READ_WRITE
 < returns the address of the data area
 can trigger GC */
static void* check_struct_data (object type, gcv_object_t *arg,
                                CLISP_SOCKLEN_T *size, int prot) {
  object vec = TheStructure(*arg = check_classname(*arg,type))->recdata[1];
  *size = Sbvector_length(vec);
  { void *start_address = (void*)(TheSbvector(vec)->data);
    handle_fault_range(prot,(aint)start_address,(aint)start_address + *size);
    return start_address;
  }
}
#line 144
#define with_sockaddr_arg(_ptr,_arg_,_size,_prot,_code)  do {                struct sockaddr* _ptr =                                                    (struct sockaddr*)check_struct_data(O(object_rawsock__sockaddr),                                                     _arg_,_size,_prot);                with_pinned_varobject(*_arg_,_code);                                   } while(0)

/* check that the arg is a vector of byte vectors
 > *arg_: vector
 > STACK_0, STACK_1: START & END -- removed on success
 < *arg_: may be modified (bad vector elements replaced with byte vectors)
 < return: how many byte vectors arg contains
 removes 2 elements from STACK if success (returns a positive value)
 can trigger GC */
static int check_iovec_arg (gcv_object_t *arg_, uintL *offset) {
  int ii;
  stringarg sa;
  *arg_ = check_vector(*arg_);
  if (array_atype(*arg_) != Atype_T) return -1; /* cannot contain vectors */
  sa.offset = 0; sa.len = vector_length(*arg_);
  sa.string = array_displace_check(*arg_,sa.len,&sa.offset);
  test_vector_limits(&sa);
  *offset = sa.offset;
  for (ii=*offset; ii<sa.len; ii++)
    TheSvector(*arg_)->data[ii] =
      check_byte_vector(TheSvector(*arg_)->data[ii]);
  return sa.len;
}
#if !defined(HAVE_STRUCT_IOVEC)
struct iovec { void *iov_base; size_t iov_len; };
#endif  /* HAVE_STRUCT_IOVEC */
#if !defined(HAVE_READV)        /* emulate readv using read */
static ssize_t readv (rawsock_t sock, const struct iovec *iov, int len) {
  ssize_t retval = 0;
  for (; len--; iov++)
    retval += READ(sock,iov->iov_base,iov->iov_len);
  return retval;
}
#endif
#if !defined(HAVE_WRITEV)       /* emulate writev using write */
static ssize_t writev (rawsock_t sock, const struct iovec *iov, int len) {
  ssize_t retval = 0;
  for (; len--; iov++)
    retval += WRITE(sock,iov->iov_base,iov->iov_len);
  return retval;
}
#endif
/* DANGER: the return value is invalidated by GC!
 this must be called _after_ check_iovec_arg()
 fill the iovec array from the vector of byte vectors
 < vect: (vector (byte-vector))
 < offset: starting offset into vect
 < veclen: number of vect elements to put into buffer
 < buffer: array of struct iovec of length veclen
 < prot: PROT_READ or PROT_READ_WRITE
 > buffer: filled in with data pointers of elements of vect */
#if defined(MULTITHREAD)
#  define PIN_ARG_USE   ,pcv
#  define PIN_ARG_DECL  , pinned_chain_t *pcv
#  define PIN_DECL      pinned_chain_t *pcv
#  define PIN_INIT(len) pcv = (pinned_chain_t*)alloca((len)*sizeof(pinned_chain_t))
#else
#  define PIN_ARG_USE
#  define PIN_ARG_DECL
#  define PIN_DECL
#  define PIN_INIT(len)
#endif
static void fill_iovec (object vect, size_t offset, ssize_t veclen,
                        struct iovec *buffer, int prot PIN_ARG_DECL) {
  gcv_object_t *vec = TheSvector(vect)->data + offset;
  ssize_t pos = veclen;
  for (;pos--; buffer++, vec++) {
    size_t len = vector_length(*vec);
    uintL index = 0;
    object data_vec = array_displace_check(*vec,len,&index);
    pin_varobject_with_pc(&(pcv[pos]),data_vec);
    buffer->iov_len = len;
    buffer->iov_base= TheSbvector(data_vec)->data + index;
    handle_fault_range(prot,(aint)buffer->iov_base,
                       (aint)buffer->iov_base + len);
  }
}

DEFUN(RAWSOCK:SOCKADDR-FAMILY, sa,(subr_rawsock_sockaddr_family,seclass_default,1,0,norest,nokey,0,NIL)) {
  CLISP_SOCKLEN_T size;
  with_sockaddr_arg(sa,&STACK_0,&size,PROT_READ,
                    VALUES2(check_socket_domain_reverse(sa->sa_family),
                            fixnum(size)));
  skipSTACK(1);
}
DEFUN(RAWSOCK::SOCKADDR-SLOT,&optional slot,(subr_rawsock_sockaddr_slot,seclass_default,0,1,norest,nokey,0,NIL)) {
  /* return offset & size of the slot in SOCKADDR */
 restart_sockaddr_slot:
  if (missingp(STACK_0)) {
    VALUES1(fixnum(sizeof(struct sockaddr)));
  } else if (eq(STACK_0,O(object_Kfamily))) {
    struct sockaddr sa;
    VALUES2(fixnum(offsetof(struct sockaddr,sa_family)),
            fixnum(sizeof(sa.sa_family)));
  } else if (eq(STACK_0,O(object_Kdata))) {
    struct sockaddr sa;
    VALUES2(fixnum(offsetof(struct sockaddr,sa_data)),
            fixnum(sizeof(sa.sa_data)));
  } else {
    pushSTACK(NIL);             /* no PLACE */
    pushSTACK(STACK_1/*slot*/); /* TYPE-ERROR slot DATUM */
    pushSTACK(O(object__28member_20_family_20_data_29)); /* TYPE-ERROR slot EXPECTED-TYPE */
    pushSTACK(O(object_rawsock__sockaddr)); pushSTACK(STACK_2/*slot*/);
    pushSTACK(TheSubr(subr_self)->name);
    check_value(type_error,GETTEXT("~S: unknown slot ~S for ~S"));
    STACK_0 = value1;
    goto restart_sockaddr_slot;
  }
  skipSTACK(1);
}

/* can trigger GC */
static object make_sockaddr1 (uintL size) {
  pushSTACK(allocate_bit_vector(Atype_8Bit,size));
  funcall(O(object_rawsock__make_sa),1);
  return value1;
}
#define make_sockaddr()  make_sockaddr1(sizeof(struct sockaddr))

/* can trigger GC */
static object sockaddr_to_lisp (struct sockaddr *sa, uintL size) {
  pushSTACK(allocate_bit_vector(Atype_8Bit,size));
  begin_system_call();
  memcpy(TheSbvector(STACK_0)->data,sa,size);
  end_system_call();
  funcall(O(object_rawsock__make_sa),1); return value1;
}
#define pushSTACK_sockaddr(sa)  pushSTACK(sa ? sockaddr_to_lisp(sa,sizeof(*sa)) : NIL)

struct pos {
  gcv_object_t *vector;
  unsigned int position;
};
void coerce_into_bytes (void *arg, object element);
void coerce_into_bytes (void *arg, object element) {
  struct pos * pos = (struct pos *)arg;
  uint8 value = I_to_uint8(check_uint8(element));
  TheSbvector(*(pos->vector))->data[pos->position++] = value;
}

DEFUN(RAWSOCK:MAKE-SOCKADDR,family &optional data,(subr_rawsock_make_sockaddr,seclass_default,1,1,norest,nokey,0,NIL)) {
  int family = check_socket_domain(STACK_1);
  unsigned char *buffer;
  size_t buffer_len, data_start = offsetof(struct sockaddr,sa_data);
  struct pos arg;
  if (missingp(STACK_0)) {      /* standard size */
    buffer_len = sizeof(struct sockaddr) - data_start;
  } else if (posfixnump(STACK_0)) { /* integer data => as if sequence of 0 */
    buffer_len = posfixnum_to_V(STACK_0);
  } else {                      /* data should be a sequence */
    pushSTACK(STACK_0); funcall(L(length),1);
    buffer_len = I_to_uint32(value1);
  }
  pushSTACK(allocate_bit_vector(Atype_8Bit,data_start + buffer_len));
  buffer = (unsigned char *)TheSbvector(STACK_0)->data;
  begin_system_call();
  memset(buffer,0,data_start + buffer_len);
  end_system_call();
  ((struct sockaddr*)buffer)->sa_family = family;
  arg.vector = &(STACK_0); arg.position = data_start;
  if (!missingp(STACK_1) && !posfixnump(STACK_1))
    map_sequence(STACK_1/*data*/,coerce_into_bytes,(void*)&arg);
  funcall(O(object_rawsock__make_sa),1);
  skipSTACK(2);
}

/* ================== SIGPIPE handling ================== */
#define begin_sock_call()  START_WRITING_TO_SUBPROCESS;  begin_blocking_system_call()
#define end_sock_call()    end_blocking_system_call(); STOP_WRITING_TO_SUBPROCESS

/* report error on the given socket or OS_error if socket<0 */
nonreturning_function(static, rawsock_error, (int socket)) {
  if (socket < 0) OS_error();
  begin_system_call(); {
    int ecode = errno;
    char *msg = strerror(ecode);
    end_system_call();
    pushSTACK(O(object_rawsock__rawsock_error));    /* error type */
    pushSTACK(S(Kcode));
    pushSTACK(fixnum(errno)); funcall(O(object_os__errno),1); pushSTACK(value1);
    pushSTACK(O(object_Kmessage)); pushSTACK(safe_to_string(msg));
    pushSTACK(O(object_Ksocket)); pushSTACK(fixnum(socket));
    funcall(S(make_instance),7);
  }
  pushSTACK(value1); funcall(S(error),1);
  NOTREACHED;
}

/* invoke system call C, place return value in R, report error on socket S */
#line 336
#define SYSCALL(r,s,c)                                                     do { begin_sock_call(); r = c; end_sock_call();                            if (r == -1) rawsock_error(s);                                         } while(0)

/* ================== arpa/inet.h interface ================== */
/* Define even when the OS lacks the C functions; in that case,
   we emulate the C functions. */
DEFUN(RAWSOCK:HTONL, num,(subr_rawsock_htonl,seclass_default,1,0,norest,nokey,0,NIL)) {
  uint32 arg = I_to_uint32(check_uint32(popSTACK()));
  uint32 result;
#if defined(HAVE_HTONL) || defined(WIN32_NATIVE)
  begin_system_call(); result = htonl(arg); end_system_call();
#else
  union { struct { uint8 octet3; uint8 octet2; uint8 octet1; uint8 octet0; } o;
          uint32 all;
        }
        word;
  word.all = arg;
  result = ((uint32)word.o.octet3 << 24) | ((uint32)word.o.octet2 << 16)
           | ((uint32)word.o.octet1 << 8) | (uint32)word.o.octet0;
#endif
  VALUES1(uint32_to_I(result));
}
DEFUN(RAWSOCK:NTOHL, num,(subr_rawsock_ntohl,seclass_default,1,0,norest,nokey,0,NIL)) {
  uint32 arg = I_to_uint32(check_uint32(popSTACK()));
  uint32 result;
#if defined(HAVE_NTOHL) || defined(WIN32_NATIVE)
  begin_system_call(); result = ntohl(arg); end_system_call();
#else
  union { struct { uint8 octet3; uint8 octet2; uint8 octet1; uint8 octet0; } o;
          uint32 all;
        }
        word;
  word.o.octet3 = (arg >> 24) & 0xff;
  word.o.octet2 = (arg >> 16) & 0xff;
  word.o.octet1 = (arg >> 8) & 0xff;
  word.o.octet0 = arg & 0xff;
  result = word.all;
#endif
  VALUES1(uint32_to_I(result));
}
DEFUN(RAWSOCK:HTONS, num,(subr_rawsock_htons,seclass_default,1,0,norest,nokey,0,NIL)) {
  uint16 arg = I_to_uint16(check_uint16(popSTACK()));
  uint16 result;
#if defined(HAVE_HTONS) || defined(WIN32_NATIVE)
  begin_system_call(); result = htons(arg); end_system_call();
#else
  union { struct { uint8 octet1; uint8 octet0; } o;
          uint16 all;
        }
        word;
  word.all = arg;
  result = ((uint16)word.o.octet1 << 8) | (uint16)word.o.octet0;
#endif
  VALUES1(uint16_to_I(result));
}
DEFUN(RAWSOCK:NTOHS, num,(subr_rawsock_ntohs,seclass_default,1,0,norest,nokey,0,NIL)) {
  uint16 arg = I_to_uint16(check_uint16(popSTACK()));
  uint16 result;
#if defined(HAVE_NTOHS) || defined(WIN32_NATIVE)
  begin_system_call(); result = ntohs(arg); end_system_call();
#else
  union { struct { uint8 octet1; uint8 octet0; } o;
          uint16 all;
        }
        word;
  word.o.octet1 = (arg >> 8) & 0xff;
  word.o.octet0 = arg & 0xff;
  result = word.all;
#endif
  VALUES1(uint16_to_I(result));
}
DEFUN(RAWSOCK:CONVERT-ADDRESS, family address,(subr_rawsock_convert_address,seclass_default,2,0,norest,nokey,0,NIL)) {
  int family = check_socket_domain(STACK_1);
 convert_address_restart:
  if (stringp(STACK_0)) {
    with_string_0(STACK_0,Symbol_value(S(utf_8)),ip_address,
                  { value1 = string_to_addr(ip_address); });
  } else if (integerp(STACK_0)) {
    switch (family) {
     #if defined(AF_INET6)
      case AF_INET6: {
        uint64 ip_address;
        UI_to_LEbytes(check_uint64(STACK_0),8*sizeof(uint64),
                      (uintB*)&ip_address);
        value1 = addr_to_string(family,(char*)&ip_address);
      } break;
     #endif
      case AF_INET: {
        uint32 ip_address;
        UI_to_LEbytes(check_uint32(STACK_0),8*sizeof(uint32),
                      (uintB*)&ip_address);
        value1 = addr_to_string(family,(char*)&ip_address);
      } break;
      default: value1 = NIL;
    }
  } else error_string_integer(STACK_0);
  if (nullp(value1)) {
    pushSTACK(NIL);             /* no PLACE */
    pushSTACK(STACK_1);         /* domain */
    pushSTACK(STACK_1);         /* address */
    pushSTACK(TheSubr(subr_self)->name);
    check_value(error_condition,GETTEXT("~S: invalid address ~S for family ~S"));
    STACK_0 = value1;
    goto convert_address_restart;
  }
  skipSTACK(2); mv_count = 1;
}

/* ================== netdb.h interface ================== */
#if defined(HAVE_NETDB_H)
/* return RAWSOCK:PROTOCOL object in value1 */
static Values protoent_to_protocol (struct protoent *pe) {
  pushSTACK(asciz_to_string(pe->p_name,GLO(misc_encoding)));
  push_string_array(pe->p_aliases);
  pushSTACK(sint_to_I(pe->p_proto));
  funcall(O(object_rawsock__make_protocol),3);
}
DEFUN(RAWSOCK:PROTOCOL, &optional protocol,(subr_rawsock_protocol,seclass_default,0,1,norest,nokey,0,NIL))
{ /* interface to getprotobyname() et al
     http://www.opengroup.org/onlinepubs/9699919799/functions/getprotoent.html */
  object proto = popSTACK();
  struct protoent *pe = NULL;
  if (missingp(proto)) {        /* get all protocols */
    int count = 0;
    begin_system_call();
#  if defined(HAVE_SETPROTOENT) && defined(HAVE_GETPROTOENT) && defined(HAVE_ENDPROTOENT)
    setprotoent(1);
    while ((pe = getprotoent())) {
      end_system_call();
      protoent_to_protocol(pe); pushSTACK(value1); count++;
      begin_system_call();
    }
    endprotoent();
#  endif
    end_system_call();
    VALUES1(listof(count));
    return;
  } else if (sint_p(proto)) {
#  if defined(HAVE_GETPROTOBYNUMBER) || defined(WIN32_NATIVE)
    begin_system_call();
    pe = getprotobynumber(I_to_sint(proto));
    end_system_call();
#  endif
  } else if (stringp(proto)) {
#  if defined(HAVE_GETPROTOBYNAME) || defined(WIN32_NATIVE)
    with_string_0(proto,GLO(misc_encoding),protoz, {
        begin_system_call();
        pe = getprotobyname(protoz);
        end_system_call();
      });
#  endif
  } else error_string_integer(proto);
  if (pe) protoent_to_protocol(pe);
  else VALUES1(NIL);
}
/* --------------- */
/* return RAWSOCK:NETWORK object in value1 */
static Values netent_to_network (struct netent *ne) {
  pushSTACK(asciz_to_string(ne->n_name,GLO(misc_encoding)));
  push_string_array(ne->n_aliases);
  pushSTACK(sint_to_I(ne->n_addrtype));
  pushSTACK(sint_to_I(ne->n_net));
  funcall(O(object_rawsock__make_network),4);
}
DEFUN(RAWSOCK:NETWORK, &optional network type,(subr_rawsock_network,seclass_default,0,2,norest,nokey,0,NIL))
{ /* interface to getnetbyname() et al
     http://www.opengroup.org/onlinepubs/9699919799/functions/getnetent.html */
  unsigned int type = check_uint_defaulted(popSTACK(),(unsigned int)-1);
  object net = popSTACK();
  struct netent *ne = NULL;
  if (missingp(net)) {          /* get all networks */
    int count = 0;
#  if defined(HAVE_SETNETENT) && defined(HAVE_GETNETENT) && defined(HAVE_ENDNETENT)
    begin_system_call();
    setnetent(1);
    while ((ne = getnetent())) {
      end_system_call();
      if (type==(unsigned int)-1 || type==ne->n_addrtype) {
        netent_to_network(ne); pushSTACK(value1); count++;
      }
      begin_system_call();
    }
    endnetent();
    end_system_call();
#  endif
    VALUES1(listof(count));
    return;
  } else if (uint_p(net)) {
#  if defined(HAVE_GETNETBYADDR)
    begin_system_call();
    ne = getnetbyaddr(I_to_uint(net),type);
    end_system_call();
#  endif
  } else if (stringp(net)) {
#  if defined(HAVE_GETNETBYNAME)
    with_string_0(net,GLO(misc_encoding),netz, {
        begin_system_call();
        ne = getnetbyname(netz);
        end_system_call();
      });
#  endif
  } else error_string_integer(net);
  if (ne) netent_to_network(ne);
  else VALUES1(NIL);
}
#endif  /* HAVE_NETDB_H */
/* ================== net/if.h interface ================== */
/* http://www.opengroup.org/onlinepubs/9699919799/basedefs/net_if.h.html */
#if defined(HAVE_NET_IF_H)
DEFUN(RAWSOCK:IF-NAME-INDEX, &optional what,(subr_rawsock_if_name_index,seclass_default,0,1,norest,nokey,0,NIL)) {
  if (missingp(STACK_0)) {
    int count = 0;
#  if defined(HAVE_IF_NAMEINDEX) && defined(HAVE_IF_FREENAMEINDEX)
    struct if_nameindex *ifni;
    begin_system_call();
    if ((ifni = if_nameindex()) == NULL) OS_error();
    end_system_call();
    for (; ifni[count].if_index; count++) {
      pushSTACK(allocate_cons());
      Car(STACK_0) = uint_to_I(ifni[count].if_index);
      Cdr(STACK_0) = asciz_to_string(ifni[count].if_name,GLO(misc_encoding));
    }
    begin_system_call(); if_freenameindex(ifni); end_system_call();
#  endif
    VALUES1(listof(count));
  } else if (uint_p(STACK_0)) {
#  if defined(HAVE_IF_INDEXTONAME)
    char name[IF_NAMESIZE];
    begin_system_call();
    if (NULL == if_indextoname(I_to_uint(STACK_0),name)) OS_error();
    end_system_call();
    VALUES1(asciz_to_string(name,GLO(misc_encoding)));
#  else
    pushSTACK(TheSubr(subr_self)->name);
    error(error_condition,GETTEXT("~S: no if_indextoname() at configure time"));
#  endif
  } else if (stringp(STACK_0)) {
#  if defined(HAVE_IF_INDEXTONAME)
    unsigned int idx;
    with_string_0(STACK_0,GLO(misc_encoding),namez, {
        begin_system_call();
        if (0 == (idx = if_nametoindex(namez))) OS_error();
        end_system_call();
      });
    VALUES1(uint_to_I(idx));
#  else
    pushSTACK(TheSubr(subr_self)->name);
    error(error_condition,GETTEXT("~S: no if_nametoindex() at configure time"));
#  endif
  } else error_string_integer(STACK_0);
  skipSTACK(1);
}
#endif  /* net/if.h */
/* ================== ifaddrs.h interface ================== */
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
#line 595

DEFUN(RAWSOCK:IFADDRS,&key FLAGS-AND FLAGS-OR,(subr_rawsock_ifaddrs,seclass_default,0,0,norest,key,2,NIL)) {
  struct ifaddrs *ifap;
  int count = 0;
  unsigned int flags_or = check_iff_of_list(popSTACK());
  unsigned int flags_and = missingp(STACK_0) ? 0 : check_iff_of_list(STACK_0);
  skipSTACK(1);                 /* drop flags_and */
  begin_system_call(); if(-1==getifaddrs(&ifap)) OS_error(); end_system_call();
  for (; ifap; ifap=ifap->ifa_next)
    if ((flags_or & ifap->ifa_flags)
        && ((flags_and & ifap->ifa_flags) == flags_and)) {
      pushSTACK(asciz_to_string(ifap->ifa_name,GLO(misc_encoding)));
      pushSTACK(check_iff_to_list(ifap->ifa_flags));
      pushSTACK_sockaddr(ifap->ifa_addr);
      pushSTACK_sockaddr(ifap->ifa_netmask);
      if (ifap->ifa_flags & IFF_BROADCAST)
        if (ifap->ifa_flags & IFF_POINTOPOINT) {
          pushSTACK(STACK_3);   /* ifa_name */
          pushSTACK(TheSubr(subr_self)->name);
          error(error_condition,GETTEXT("~S: both IFF_BROADCAST and IFF_POINTOPOINT set for ~S"));
        } else pushSTACK_sockaddr(ifap->ifa_broadaddr);
      else if (ifap->ifa_flags & IFF_POINTOPOINT)
        pushSTACK_sockaddr(ifap->ifa_dstaddr);
      else pushSTACK(NIL);
      pushSTACK(ifap->ifa_data ? allocate_fpointer(ifap->ifa_data) : NIL);
      funcall(O(object_rawsock__make_ifaddrs),6);
      pushSTACK(value1); count++;
    }
  begin_system_call(); freeifaddrs(ifap); end_system_call();
  VALUES1(listof(count));
}
#endif  /* ifaddrs.h */
/* ================== sys/socket.h interface ================== */
#line 633

#line 635

#line 658


/* check the protocol - number, string, or constant from check_socket_protocol
 can trigger GC */
static int get_socket_protocol (object proto) {
#if defined(HAVE_GETPROTOBYNAME)
 get_socket_protocol_restart:
  if (stringp(proto)) {
    struct protoent *pe;
    with_string_0(proto,GLO(misc_encoding),protoz, {
        begin_system_call(); pe = getprotobyname(protoz); end_system_call();
      });
    if (pe) return pe->p_proto;
    pushSTACK(NIL);             /* no PLACE */
    pushSTACK(proto); pushSTACK(TheSubr(subr_self)->name);
    check_value(error_condition,GETTEXT("~S: invalid protocol name ~S"));
    proto = value1;
    goto get_socket_protocol_restart;
  } else
#endif
    return check_socket_protocol(proto);
}

DEFUN(RAWSOCK:SOCKET,domain type protocol,(subr_rawsock_socket,seclass_default,3,0,norest,nokey,0,NIL)) {
  rawsock_t sock;
  int protocol = get_socket_protocol(popSTACK());
  int type = check_socket_type(popSTACK());
  int domain = check_socket_domain(popSTACK());
  SYSCALL(sock,-1,socket(domain,type,protocol));
  VALUES1(fixnum(sock));
}

DEFUN(RAWSOCK:SOCKETPAIR,domain type protocol,(subr_rawsock_socketpair,seclass_default,3,0,norest,nokey,0,NIL)) {
  rawsock_t sock[2];
  int retval;
  int protocol = get_socket_protocol(popSTACK());
  int type = check_socket_type(popSTACK());
  int domain = check_socket_domain(popSTACK());
#if defined(HAVE_SOCKETPAIR)
  SYSCALL(retval,-1,socketpair(domain,type,protocol,sock));
#else /* woe32 et al */
  struct sockaddr_in addr;
  CLISP_SOCKLEN_T sa_size = sizeof(struct sockaddr_in);
  rawsock_t newsock;
  addr.sin_family = domain;
  addr.sin_port = 0;            /* OS will assign an available port */
  addr.sin_addr.s_addr = 16777343; /* 127.0.0.1 */
  SYSCALL(sock[0],-1,socket(domain,type,protocol));
  SYSCALL(sock[1],-1,socket(domain,type,protocol));
  SYSCALL(retval,sock[1],bind(sock[1],(struct sockaddr*)&addr,
                              sizeof(struct sockaddr_in)));
  SYSCALL(retval,sock[1],listen(sock[1],1));
  /* figure out what port was assigned: */
  SYSCALL(retval,sock[1],getsockname(sock[1],(struct sockaddr*)&addr,&sa_size));
  SYSCALL(retval,sock[0],connect(sock[0],(struct sockaddr*)&addr,sa_size));
  SYSCALL(newsock,sock[1],accept(sock[1],(struct sockaddr*)&addr,&sa_size));
  /* do not need the server anymore: */
  SYSCALL(retval,sock[1],CLOSESOCK(sock[1]));
  sock[1] = newsock;
#endif
  VALUES2(fixnum(sock[0]),fixnum(sock[1]));
}

#if defined(HAVE_SOCKATMARK)
DEFUN(RAWSOCK:SOCKATMARK, sock,(subr_rawsock_sockatmark,seclass_default,1,0,norest,nokey,0,NIL)) {
  rawsock_t sock = I_to_uint(check_uint(popSTACK()));
  int retval;
  SYSCALL(retval,sock,sockatmark(sock));
  VALUES_IF(retval);
}
#endif

/* process optional (struct sockaddr*) argument:
   NIL: return NULL
   T: allocate
   SOCKADDR: extract data
 the return value is invalidated by GC, only use in with_opt_sa_arg
 can trigger GC */
static /*maygc*/ struct sockaddr* optional_sockaddr_argument
(gcv_object_t *arg, CLISP_SOCKLEN_T *size PIN_ARG_DECL) {
  if (nullp(*arg)) return NULL;
  else {
    if (eq(T,*arg)) *arg = make_sockaddr();
    struct sockaddr* sa =
      (struct sockaddr*)check_struct_data(O(object_rawsock__sockaddr),
                                          arg,size,PROT_READ_WRITE);
    pin_varobject_with_pc(pcv,*arg);
    return sa;
  }
}
#if defined(MULTITHREAD)
#line 754
#define with_opt_sa_arg(_sa,_arg_,_size,_code)  do {                         pinned_chain_t pc;                                                       struct sockaddr *sa = optional_sockaddr_argument(_arg_,_size,&pc);       _code;                                                                   if (sa) unpin_varobject(pc.pc_varobject);                              } while(0)
#else
#line 759
#define with_opt_sa_arg(_sa,_arg_,_size,_code)  do {                         struct sockaddr *sa = optional_sockaddr_argument(_arg_,_size);           _code;                                                                 } while(0)
#endif

DEFUN(RAWSOCK:ACCEPT,socket sockaddr,(subr_rawsock_accept,seclass_default,2,0,norest,nokey,0,NIL)) {
  rawsock_t sock = I_to_uint(check_uint(STACK_1));
  int retval;
  CLISP_SOCKLEN_T sa_size;
  with_opt_sa_arg(sa,&STACK_0,&sa_size,
                  SYSCALL(retval,sock,accept(sock,sa,&sa_size)));
  VALUES3(fixnum(retval),fixnum(sa_size),STACK_0); skipSTACK(2);
}

DEFUN(RAWSOCK:BIND,socket sockaddr,(subr_rawsock_bind,seclass_default,2,0,norest,nokey,0,NIL)) {
  rawsock_t sock = I_to_uint(check_uint(STACK_1));
  int retval;
  CLISP_SOCKLEN_T size;
  with_sockaddr_arg(sa,&STACK_0,&size,PROT_READ,
                    SYSCALL(retval,sock,bind(sock,sa,size)));
  VALUES0; skipSTACK(2);
}

DEFUN(RAWSOCK:CONNECT,socket sockaddr,(subr_rawsock_connect,seclass_default,2,0,norest,nokey,0,NIL)) {
  rawsock_t sock = I_to_uint(check_uint(STACK_1));
  int retval;
  CLISP_SOCKLEN_T size;
  with_sockaddr_arg(sa,&STACK_0,&size,PROT_READ,
                    SYSCALL(retval,sock,connect(sock,sa,size)));
  VALUES0; skipSTACK(2);
}

DEFUN(RAWSOCK:GETPEERNAME,socket sockaddr,(subr_rawsock_getpeername,seclass_default,2,0,norest,nokey,0,NIL)) {
  rawsock_t sock = I_to_uint(check_uint(STACK_1));
  int retval;
  CLISP_SOCKLEN_T sa_size;
  with_opt_sa_arg(sa,&STACK_0,&sa_size,
                  SYSCALL(retval,sock,getpeername(sock,sa,&sa_size)));
  VALUES2(STACK_0,fixnum(sa_size)); skipSTACK(2);
}

DEFUN(RAWSOCK:GETSOCKNAME,socket sockaddr,(subr_rawsock_getsockname,seclass_default,2,0,norest,nokey,0,NIL)) {
  rawsock_t sock = I_to_uint(check_uint(STACK_1));
  int retval;
  CLISP_SOCKLEN_T sa_size;
  with_opt_sa_arg(sa,&STACK_0,&sa_size,
                  SYSCALL(retval,sock,getsockname(sock,sa,&sa_size)));
  VALUES2(STACK_0,fixnum(sa_size)); skipSTACK(2);
}

DEFUN(RAWSOCK:SOCK-LISTEN,socket &optional backlog,(subr_rawsock_sock_listen,seclass_default,1,1,norest,nokey,0,NIL)) {
  int backlog = check_uint_defaulted(popSTACK(),SOMAXCONN);
  rawsock_t sock = I_to_uint(check_uint(popSTACK()));
  int retval;
  SYSCALL(retval,sock,listen(sock,backlog));
  VALUES0;
}

#if defined(WIN32_NATIVE)
nonreturning_function(static, error_missing, (object function)) {
  pushSTACK(function); pushSTACK(TheSubr(subr_self)->name);
  error(error_condition,GETTEXT("~S: your ws2_32.dll does not implement ~S"));
}
#endif

#if defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)
#if defined(WIN32_NATIVE)
typedef char* (WSAAPI *gai_strerror_t) (int);
static char* WSAAPI my_gai_strerror (int ecode)
{ error_missing(O(object__22gai_strerror_22)); }
static gai_strerror_t gai_strerror_f = &my_gai_strerror;
#else
# define gai_strerror_f gai_strerror
#endif
#line 833

#else
# define check_gai_ecode_reverse L_to_I
#endif
nonreturning_function(static, error_eai, (int ecode)) {
  begin_system_call();
#if defined(HAVE_GAI_STRERROR) || defined(WIN32_NATIVE)
  const char* msg = gai_strerror_f(ecode);
#else
  const char* msg = strerror(ecode);
#endif
  end_system_call();
  pushSTACK(O(object_rawsock__eai));    /* error type */
  pushSTACK(S(Kcode)); pushSTACK(check_gai_ecode_reverse(ecode));
  pushSTACK(O(object_Kmessage)); pushSTACK(safe_to_string(msg));
  funcall(S(make_instance),5);
  pushSTACK(value1); funcall(S(error),1);
  NOTREACHED;
}

#if defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)
#if defined(WIN32_NATIVE)
typedef int (WSAAPI *getnameinfo_t) (const struct sockaddr*,socklen_t,char*,
                                     DWORD,char*,DWORD,int);
static int WSAAPI my_getnameinfo (const struct sockaddr* sa,socklen_t sl,
                                  char* nd,DWORD ndl,char* sv,DWORD svl,int f)
{ error_missing(O(object__22getnameinfo_22)); }
static getnameinfo_t getnameinfo_f = &my_getnameinfo;
#else
# define getnameinfo_f getnameinfo
#endif
#line 865

#line 867
DEFUN(RAWSOCK:GETNAMEINFO, sockaddr &key NOFQDN NUMERICHOST NAMEREQD        NUMERICSERV NUMERICSCOPE DGRAM,(subr_rawsock_getnameinfo,seclass_default,1,0,norest,key,6,NIL)) {
  int flags = getnameinfo_flags();
  CLISP_SOCKLEN_T size;
  char node[BUFSIZ], service[BUFSIZ];
  int status;
  with_sockaddr_arg(sa,&STACK_0,&size,PROT_READ, {
      begin_sock_call();
      status = getnameinfo_f(sa,size,node,BUFSIZ,service,BUFSIZ,flags);
      end_sock_call();
    });
  if (status) error_eai(status);
  STACK_0 = asciz_to_string(service,GLO(misc_encoding));
  VALUES2(asciz_to_string(node,GLO(misc_encoding)),popSTACK());
}
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
#if defined(WIN32_NATIVE)
typedef void (WSAAPI *freeaddrinfo_t) (struct addrinfo*);
static void WSAAPI my_freeaddrinfo (struct addrinfo* ai)
{ error_missing(O(object__22freeaddrinfo_22)); }
typedef int (WSAAPI *getaddrinfo_t)
  (const char*,const char*, const struct addrinfo*, struct addrinfo**);
static freeaddrinfo_t freeaddrinfo_f = &my_freeaddrinfo;
static int WSAAPI my_getaddrinfo (const char* nd,const char* sv,
                                  const struct addrinfo* hints,
                                  struct addrinfo** ret)
{ error_missing(O(object__22getaddrinfo_22)); }
static getaddrinfo_t getaddrinfo_f = &my_getaddrinfo;
#else
# define getaddrinfo_f getaddrinfo
# define freeaddrinfo_f freeaddrinfo
#endif
#line 900

#line 902

static void call_getaddrinfo (const char* nd,const char* sv,
                              const struct addrinfo* hints,
                              struct addrinfo** ret) {
  int status;
  begin_system_call();
  if ((status = getaddrinfo_f(nd,sv,hints,ret))) error_eai(status);
  end_system_call();
}
#line 912
DEFUN(RAWSOCK:GETADDRINFO, &key NODE SERVICE PROTOCOL SOCKTYPE FAMILY        PASSIVE CANONNAME NUMERICHOST NUMERICSERV V4MAPPED :ALL ADDRCONFIG,(subr_rawsock_getaddrinfo,seclass_default,0,0,norest,key,12,NIL)) {
  struct addrinfo hints = {addrinfo_flags(),
                           check_socket_domain(popSTACK()),
                           check_socket_type(popSTACK()),
                           get_socket_protocol(popSTACK()),
                           0,NULL,NULL,NULL};
  struct addrinfo *ret = NULL, *tmp;
  int valcount = 0;
  if (missingp(STACK_0)) {
    if (missingp(STACK_1))
      call_getaddrinfo(NULL,NULL,&hints,&ret);
    else
      with_string_0(check_string(STACK_1),GLO(misc_encoding),node, {
          call_getaddrinfo(node,NULL,&hints,&ret);
        });
  } else {
    with_string_0(check_string(STACK_0),GLO(misc_encoding),service, {
        if (missingp(STACK_1))
          call_getaddrinfo(NULL,service,&hints,&ret);
        else
          with_string_0(check_string(STACK_1),GLO(misc_encoding),node, {
              call_getaddrinfo(node,service,&hints,&ret);
            });
      });
  }
  for (tmp = ret; tmp; tmp = tmp->ai_next, valcount++) {
    pushSTACK(check_addrinfo_flags_to_list(tmp->ai_flags));
    pushSTACK(check_socket_domain_reverse(tmp->ai_family));
    pushSTACK(check_socket_type_reverse(tmp->ai_socktype));
    pushSTACK(check_socket_protocol_reverse(tmp->ai_protocol));
    pushSTACK(sockaddr_to_lisp(tmp->ai_addr,tmp->ai_addrlen));
    pushSTACK(safe_to_string(tmp->ai_canonname));
    funcall(O(object_rawsock__make_addrinfo),6); pushSTACK(value1);
  }
  if (ret) { begin_system_call(); freeaddrinfo_f(ret); end_system_call(); }
  VALUES1(listof(valcount)); skipSTACK(2);
}
#endif

/* ================== RECEIVING ================== */
/* FIXME: replace this with a complete autoconf check using CL_PROTO() */
#if defined(WIN32_NATIVE)
# define BUF_TYPE_T char*
#else
# define BUF_TYPE_T void*
#endif

/* remove 3 objects from the STACK and return the RECV flag
   based on MSG_PEEK MSG_OOB MSG_WAITALL */

DEFUN(RAWSOCK:RECV,socket buffer &key :START :END PEEK OOB WAITALL,(subr_rawsock_recv,seclass_default,2,0,norest,key,5,NIL)) {
  int flags = recv_flags();
  rawsock_t sock = I_to_uint(check_uint(STACK_3));
  int retval;
  size_t buffer_len;
  with_buffer_arg(buffer,&STACK_2,&buffer_len,PROT_READ_WRITE,
                  SYSCALL(retval,sock,recv(sock,(BUF_TYPE_T)buffer,
                                           buffer_len,flags)));
  VALUES1(fixnum(retval)); skipSTACK(2);
}

DEFUN(RAWSOCK:RECVFROM,socket buffer address &key :START :END PEEK OOB WAITALL,(subr_rawsock_recvfrom,seclass_default,3,0,norest,key,5,NIL)){
  int flags = recv_flags();
  rawsock_t sock = I_to_uint(check_uint(STACK_4));
  int retval;
  void *buffer;
  size_t buffer_len;
  CLISP_SOCKLEN_T sa_size;
  if (!missingp(STACK_0)) STACK_0 = check_posfixnum(STACK_0);
  if (!missingp(STACK_1)) STACK_1 = check_posfixnum(STACK_1);
  STACK_3 = check_byte_vector(STACK_3);
  with_opt_sa_arg(sa,&STACK_2,&sa_size,
    with_buffer_arg(buffer,&STACK_3,&buffer_len,PROT_READ_WRITE,
      SYSCALL(retval,sock,recvfrom(sock,(BUF_TYPE_T)buffer,
                                   buffer_len,flags,sa,&sa_size))));
  VALUES3(fixnum(retval),fixnum(sa_size),STACK_0); skipSTACK(3);
}

#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
#line 993

/* keep this in sync with sock.lisp */
#define MSG_SOCKADDR 1
#define MSG_IOVEC    2
#define MSG_CONTROL  3
#define MSG_FLAGS    4
/* check message structure, return size/offset for iovec & flags
 < STACK_0, STACK_1: START & END, passed to check_iovec_arg() & removed
 < mho -- MESSAGE structure object
 > mho -- same, checked
 > offset -- offset into the iovec
 > mhp -- filled msg_iovlen, msg_flags
 removes 2 elements from STACK
 can trigger GC */
static void check_message (gcv_object_t *mho, uintL *offset, struct msghdr *mhp)
{
  *mho = check_classname(*mho,O(object_rawsock__message));
  TheStructure(*mho)->recdata[MSG_SOCKADDR] =
    check_classname(TheStructure(*mho)->recdata[MSG_SOCKADDR],
                    O(object_rawsock__sockaddr));
  mhp->msg_iovlen =
    check_iovec_arg(&(TheStructure(*mho)->recdata[MSG_IOVEC]),offset);
  TheStructure(*mho)->recdata[MSG_CONTROL] =
    check_byte_vector(TheStructure(*mho)->recdata[MSG_CONTROL]);
  mhp->msg_flags =
    check_msg_flags_of_list(TheStructure(*mho)->recdata[MSG_FLAGS]);
}
/* fill msg_controllen, msg_control, msg_iov, msg_name from mho */
static void fill_msghdr (gcv_object_t *mho, uintL offset, struct msghdr *mhp,
                         int prot  PIN_ARG_DECL) {
  mhp->msg_controllen =
    vector_length(TheStructure(*mho)->recdata[MSG_CONTROL]);
  mhp->msg_control =
    TheSbvector(TheStructure(*mho)->recdata[MSG_CONTROL])->data;
  handle_fault_range(prot,(aint)mhp->msg_control,
                     (aint)mhp->msg_control + mhp->msg_controllen);
  fill_iovec(TheStructure(*mho)->recdata[MSG_IOVEC],offset,mhp->msg_iovlen,
             mhp->msg_iov,prot PIN_ARG_USE);
  pushSTACK(TheStructure(*mho)->recdata[MSG_SOCKADDR]);
  mhp->msg_name = (struct sockaddr*)
    check_struct_data(O(object_rawsock__sockaddr),&STACK_0,&(mhp->msg_namelen),prot);
  pin_varobject_with_pc(&(pcv[mhp->msg_iovlen]),STACK_0);
  TheStructure(*mho)->recdata[MSG_SOCKADDR] = popSTACK();
}
/* POSIX recvmsg() */
DEFUN(RAWSOCK:RECVMSG,socket message &key :START :END PEEK OOB WAITALL,(subr_rawsock_recvmsg,seclass_default,2,0,norest,key,5,NIL)) {
  int flags = recv_flags();
  rawsock_t sock = I_to_uint(check_uint(STACK_3));
  int retval;
  struct msghdr message;
  uintL offset;
  PIN_DECL;
  check_message(&STACK_2,&offset,&message);
  message.msg_iov =
    (struct iovec*)alloca(message.msg_iovlen * sizeof(struct iovec));
  PIN_INIT(message.msg_iovlen+1);
  fill_msghdr(&STACK_0,offset,&message,PROT_READ_WRITE PIN_ARG_USE);
  SYSCALL(retval,sock,recvmsg(sock,&message,flags));
  unpin_varobjects(message.msg_iovlen+1);
  TheStructure(STACK_0)->recdata[MSG_FLAGS] =
    check_msg_flags_to_list(message.msg_flags);
  VALUES2(fixnum(retval),fixnum(message.msg_namelen)); skipSTACK(2);
}
#endif  /* HAVE_RECVMSG & HAVE_MSGHDR_MSG_FLAGS & HAVE_MSGHDR_MSG_CONTROL */

DEFUN(RAWSOCK:SOCK-READ,socket buffer &key :START :END,(subr_rawsock_sock_read,seclass_default,2,0,norest,key,2,NIL))
{ /* http://www.opengroup.org/onlinepubs/9699919799/functions/read.html
     http://www.opengroup.org/onlinepubs/9699919799/functions/readv.html */
  rawsock_t sock = I_to_uint(check_uint(STACK_3));
  ssize_t retval;
  size_t len;
  uintL offset;
  if ((retval = check_iovec_arg(&STACK_2,&offset)) >= 0) { /* READV */
    ssize_t pinned_count = retval;
    struct iovec *buffer = (struct iovec*)alloca(sizeof(struct iovec)*retval);
    PIN_DECL; PIN_INIT(pinned_count);
    fill_iovec(STACK_0,offset,retval,buffer,PROT_READ_WRITE PIN_ARG_USE);
    SYSCALL(retval,sock,readv(sock,buffer,retval));
    unpin_varobjects(pinned_count);
  } else                       /* READ */
    with_buffer_arg(buffer,&STACK_2,&len,PROT_READ_WRITE,
                    SYSCALL(retval,sock,READ(sock,buffer,len)));
  VALUES1(ssize_to_I(retval)); skipSTACK(2);
}

/* ================== SENDING ================== */

/* remove 2 objects from the STACK and return the SEND flag
   based on MSG_OOB MSG_EOR */

DEFUN(RAWSOCK:SEND,socket buffer &key :START :END OOB EOR,(subr_rawsock_send,seclass_default,2,0,norest,key,4,NIL)) {
  int flags = send_flags();
  rawsock_t sock = I_to_uint(check_uint(STACK_3));
  int retval;
  size_t buffer_len;
  with_buffer_arg(buffer,&STACK_2,&buffer_len,PROT_READ,
                  SYSCALL(retval,sock,send(sock,(const BUF_TYPE_T)buffer,
                                           buffer_len,flags)));
  VALUES1(fixnum(retval)); skipSTACK(2);
}

#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
/* POSIX sendmsg() */
DEFUN(RAWSOCK:SENDMSG,socket message &key :START :END OOB EOR,(subr_rawsock_sendmsg,seclass_default,2,0,norest,key,4,NIL)) {
  int flags = send_flags();
  rawsock_t sock = I_to_uint(check_uint(STACK_3));
  int retval;
  struct msghdr message;
  uintL offset;
  PIN_DECL;
  check_message(&STACK_2,&offset,&message);
  message.msg_iov =
    (struct iovec*)alloca(message.msg_iovlen * sizeof(struct iovec));
  PIN_INIT(message.msg_iovlen+1);
  fill_msghdr(&STACK_0,offset,&message,PROT_READ PIN_ARG_USE);
  SYSCALL(retval,sock,sendmsg(sock,&message,flags));
  unpin_varobjects(message.msg_iovlen+1);
  TheStructure(STACK_0)->recdata[MSG_FLAGS] =
    check_msg_flags_to_list(message.msg_flags);
  VALUES1(fixnum(retval)); skipSTACK(2);
}
#endif  /* HAVE_SENDMSG & HAVE_MSGHDR_MSG_FLAGS & HAVE_MSGHDR_MSG_CONTROL */

DEFUN(RAWSOCK:SENDTO, socket buffer address &key :START :END OOB EOR,(subr_rawsock_sendto,seclass_default,3,0,norest,key,4,NIL)) {
  int flags = send_flags();
  rawsock_t sock = I_to_uint(check_uint(STACK_4));
  int retval;
  size_t buffer_len;
  CLISP_SOCKLEN_T size;
  if (!missingp(STACK_0)) STACK_0 = check_posfixnum(STACK_0);
  if (!missingp(STACK_1)) STACK_1 = check_posfixnum(STACK_1);
  STACK_3 = check_byte_vector(STACK_3);
  with_sockaddr_arg(sa,&STACK_2,&size,PROT_READ,
    with_buffer_arg(buffer,&STACK_3,&buffer_len,PROT_READ,
                    SYSCALL(retval,sock,sendto(sock,(const BUF_TYPE_T)buffer,
                                               buffer_len,flags,sa,size))));
  VALUES1(fixnum(retval)); skipSTACK(3);
}

DEFUN(RAWSOCK:SOCK-WRITE,socket buffer &key :START :END,(subr_rawsock_sock_write,seclass_default,2,0,norest,key,2,NIL))
{ /* http://www.opengroup.org/onlinepubs/9699919799/functions/write.html
     http://www.opengroup.org/onlinepubs/9699919799/functions/writev.html */
  rawsock_t sock = I_to_uint(check_uint(STACK_3));
  ssize_t retval;
  size_t len;
  uintL offset;
  if ((retval = check_iovec_arg(&STACK_2,&offset)) >= 0) { /* WRITEV */
    ssize_t pinned_count = retval;
    struct iovec *buffer = (struct iovec*)alloca(sizeof(struct iovec)*retval);
    PIN_DECL; PIN_INIT(pinned_count);
    fill_iovec(STACK_0,offset,retval,buffer,PROT_READ PIN_ARG_USE);
    SYSCALL(retval,sock,writev(sock,buffer,retval));
    unpin_varobjects(pinned_count);
  } else                        /* WRITE */
    with_buffer_arg(buffer,&STACK_2,&len,PROT_READ,
                    SYSCALL(retval,sock,WRITE(sock,buffer,len)));
  VALUES1(ssize_to_I(retval)); skipSTACK(2);
}

DEFUN(RAWSOCK:SOCK-CLOSE, socket,(subr_rawsock_sock_close,seclass_default,1,0,norest,nokey,0,NIL)) {
  rawsock_t sock = I_to_uint(check_uint(popSTACK()));
  int retval;
  SYSCALL(retval,sock,CLOSESOCK(sock));
  VALUES1(fixnum(retval));
}

#if defined(HAVE_NET_IF_H)
/* STACK_1 = ifname, for error reporting */
static void configdev (rawsock_t sock, char* ifname, int ipaddress, int flags) {
  struct ifreq ifrequest;
#if defined(SIOCGIFFLAGS) && defined(SIOCSIFFLAGS)
  memset(&ifrequest, 0, sizeof(struct ifreq));
  strncpy(ifrequest.ifr_name, ifname, IFNAMSIZ);
  if (ioctl(sock, SIOCGIFFLAGS, &ifrequest) < 0)
    OS_file_error(STACK_1);
  ifrequest.ifr_flags |= flags;
  if (ioctl(sock, SIOCSIFFLAGS, &ifrequest) < 0)
    OS_file_error(STACK_1);
#endif
#if defined(SIOCGIFADDR) && defined(SIOCSIFADDR)
  memset(&ifrequest, 0, sizeof(struct ifreq));
  strncpy(ifrequest.ifr_name, ifname, IFNAMSIZ);
  if (ioctl(sock, SIOCGIFADDR, &ifrequest) < 0)
    OS_file_error(STACK_1);
  /* address was 0.0.0.0 -> error */
  if (ipaddress != 0) {
    if (ioctl(sock, SIOCGIFADDR, &ifrequest) < 0)
      OS_file_error(STACK_1);
    else {
      register int j;
      for (j=2;j<6;j++) ifrequest.ifr_addr.sa_data[j] = 0;
      if (ioctl(sock, SIOCSIFADDR, &ifrequest) < 0)
        OS_file_error(STACK_1);
    }
  }
#endif
}


DEFUN(RAWSOCK:CONFIGDEV, socket ifname ipaddress &key PROMISC NOARP,(subr_rawsock_configdev,seclass_default,3,0,norest,key,2,NIL)) {
  int flags = configdev_flags();
  uint32 ipaddress = I_to_UL(check_uint32(STACK_0));
  rawsock_t sock = I_to_uint(check_uint(STACK_2));
  with_string_0(check_string(STACK_1),Symbol_value(S(utf_8)),ifname, {
      begin_blocking_system_call();
      configdev(sock, ifname, ipaddress, flags);
      end_blocking_system_call();
    });
  VALUES0; skipSTACK(3);
}
#endif  /* HAVE_NET_IF_H */

/* ================== socket options ================== */
#if defined(HAVE_GETSOCKOPT) || defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)
#line 1213

#line 1217

#endif
#if defined(HAVE_GETSOCKOPT) || defined(WIN32_NATIVE)
#line 1229
#define GET_SOCK_OPT(opt_type,retform) do {                                  opt_type val;                                                            CLISP_SOCKLEN_T len = sizeof(val);                                       int status;                                                              begin_sock_call();                                                       status = getsockopt(sock,level,name,(SETSOCKOPT_ARG_T)&val,&len);        end_sock_call();                                                         if (status==0) return retform;                                           else return (err_p ? OS_file_error(fixnum(sock)),NIL : S(Kerror));     } while(0)
/* can trigger GC */
static object get_sock_opt (rawsock_t sock, int level, int name, int err_p) {
  switch (name) {
#  if defined(SO_DEBUG)
    case SO_DEBUG:
#  endif
#  if defined(SO_ACCEPTCONN)
    case SO_ACCEPTCONN:
#  endif
#  if defined(SO_BROADCAST)
    case SO_BROADCAST:
#  endif
#  if defined(SO_REUSEADDR)
    case SO_REUSEADDR:
#  endif
#  if defined(SO_KEEPALIVE)
    case SO_KEEPALIVE:
#  endif
#  if defined(SO_OOBINLINE)
    case SO_OOBINLINE:
#  endif
#  if defined(SO_DONTROUTE)
    case SO_DONTROUTE:
#  endif
#  if defined(SO_USELOOPBACK)
    case SO_USELOOPBACK:
#  endif
      GET_SOCK_OPT(int,val ? T : NIL);
#  if defined(SO_PEERCRED)
    case SO_PEERCRED:
#  endif
#  if defined(SO_RCVLOWAT)
    case SO_RCVLOWAT:
#  endif
#  if defined(SO_SNDLOWAT)
    case SO_SNDLOWAT:
#  endif
#  if defined(SO_SNDBUF)
    case SO_SNDBUF:
#  endif
#  if defined(SO_RCVBUF)
    case SO_RCVBUF:
#  endif
#  if defined(SO_ERROR)
    case SO_ERROR:
#  endif
      GET_SOCK_OPT(int,sint_to_I(val));
#  if defined(SO_TYPE)
    case SO_TYPE:
      GET_SOCK_OPT(int,check_socket_type_reverse(val));
#  endif
#  if defined(SO_LINGER)
    case SO_LINGER:
      GET_SOCK_OPT(struct linger,val.l_onoff ? sint_to_I(val.l_linger) : NIL);
#  endif
#  if defined(SO_RCVTIMEO)
    case SO_RCVTIMEO:
#  endif
#  if defined(SO_SNDTIMEO)
    case SO_SNDTIMEO:
#  endif
      GET_SOCK_OPT(struct timeval,sec_usec_number(val.tv_sec,val.tv_usec,0));
    default: NOTREACHED;
  }
}
#undef GET_SOCK_OPT
DEFUN(RAWSOCK:SOCKET-OPTION, sock name &key :LEVEL,(subr_rawsock_socket_option,seclass_default,2,0,norest,key,1,NIL))
{ /* http://www.opengroup.org/onlinepubs/9699919799/functions/getsockopt.html */
  int level = sockopt_level(popSTACK());
  int name = sockopt_name(popSTACK());
  rawsock_t sock;
  stream_handles(popSTACK(),true,NULL,&sock,NULL);
  if (level == -1) {                      /* :ALL */
    int pos1;
    for (pos1=1; pos1 < sockopt_level_map.size; pos1++) {
      const c_lisp_pair_t *level_clp = &(sockopt_level_map.table[pos1]);
      pushSTACK(*(level_clp->l_const));
      if (name == -1) {
        int pos2;
        for (pos2=0; pos2 < sockopt_name_map.size; pos2++) {
          const c_lisp_pair_t *name_clp = &(sockopt_name_map.table[pos2]);
          pushSTACK(*name_clp->l_const);
          pushSTACK(get_sock_opt(sock,level_clp->c_const,name_clp->c_const,0));
        }
        { object tmp = listof(2*sockopt_name_map.size); pushSTACK(tmp); }
      } else
        pushSTACK(get_sock_opt(sock,level_clp->c_const,name,0));
    }
    VALUES1(listof(2*(sockopt_level_map.size-1))); /* skip :ALL */
  } else {
    if (name == -1) {
      int pos2;
      for (pos2=0; pos2 < sockopt_name_map.size; pos2++) {
        const c_lisp_pair_t *name_clp = &(sockopt_name_map.table[pos2]);
        pushSTACK(*(name_clp->l_const));
        pushSTACK(get_sock_opt(sock,level,name_clp->c_const,0));
      }
      VALUES1(listof(2*sockopt_name_map.size));
    } else
      VALUES1(get_sock_opt(sock,level,name,1));
  }
}
#endif
#if defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)
#line 1342
#define SET_SOCK_OPT(opt_type,valform) do {                                  int status;                                                              opt_type val; valform;                                                   begin_sock_call();                                                       status = setsockopt(sock,level,name,(SETSOCKOPT_ARG_T)&val,sizeof(val));      end_sock_call();                                                         if (status) OS_file_error(fixnum(sock));                                 return;                                                                } while(0)
static void set_sock_opt (rawsock_t sock, int level, int name, object value) {
  if (eq(value,S(Kerror))) return;
  switch (name) {
#  if defined(SO_DEBUG)
    case SO_DEBUG:
#  endif
#  if defined(SO_ACCEPTCONN)
    case SO_ACCEPTCONN:
#  endif
#  if defined(SO_BROADCAST)
    case SO_BROADCAST:
#  endif
#  if defined(SO_REUSEADDR)
    case SO_REUSEADDR:
#  endif
#  if defined(SO_KEEPALIVE)
    case SO_KEEPALIVE:
#  endif
#  if defined(SO_OOBINLINE)
    case SO_OOBINLINE:
#  endif
#  if defined(SO_DONTROUTE)
    case SO_DONTROUTE:
#  endif
#  if defined(SO_USELOOPBACK)
    case SO_USELOOPBACK:
#  endif
      SET_SOCK_OPT(int,val=!nullp(value));
#  if defined(SO_PEERCRED)
    case SO_PEERCRED:
#  endif
#  if defined(SO_RCVLOWAT)
    case SO_RCVLOWAT:
#  endif
#  if defined(SO_SNDLOWAT)
    case SO_SNDLOWAT:
#  endif
#  if defined(SO_SNDBUF)
    case SO_SNDBUF:
#  endif
#  if defined(SO_RCVBUF)
    case SO_RCVBUF:
#  endif
#  if defined(SO_ERROR)
    case SO_ERROR:
#  endif
      SET_SOCK_OPT(int,val=I_to_sint32(check_sint32(value)));
#  if defined(SO_TYPE)
    case SO_TYPE:
      SET_SOCK_OPT(int,val=check_socket_type(value));
#  endif
#  if defined(SO_LINGER)
    case SO_LINGER:
      SET_SOCK_OPT(struct linger,
                   if (nullp(value)) val.l_onoff=0;
                   else { val.l_onoff = 1;
                     val.l_linger = I_to_sint32(check_sint32(value));});
#  endif
#  if defined(SO_RCVTIMEO)
    case SO_RCVTIMEO:
#  endif
#  if defined(SO_SNDTIMEO)
    case SO_SNDTIMEO:
#  endif
      SET_SOCK_OPT(struct timeval,sec_usec(value,NIL,&val));
    default: NOTREACHED;
  }
}
#undef SET_SOCK_OPT
/* name=-1   => set many socket options from the plist
   otherwise => set this option
 can trigger GC */
static void set_sock_opt_many (rawsock_t sock, int level, int name,
                               object opt_or_plist) {
  if (name == -1) {
    pushSTACK(opt_or_plist); pushSTACK(opt_or_plist);
    while (!endp(STACK_0)) {
      int name = sockopt_name(Car(STACK_0));
      STACK_0 = Cdr(STACK_0);
      if (!consp(STACK_0)) error_plist_odd(STACK_1);
      set_sock_opt(sock,level,name,Car(STACK_0));
      STACK_0 = Cdr(STACK_0);
    }
    skipSTACK(2);
  } else
    set_sock_opt(sock,level,name,opt_or_plist);
}

DEFUN(RAWSOCK::SET-SOCKET-OPTION, value sock name &key :LEVEL,(subr_rawsock_set_socket_option,seclass_default,3,0,norest,key,1,NIL))
{ /* http://www.opengroup.org/onlinepubs/9699919799/functions/setsockopt.html */
  int level = sockopt_level(popSTACK());
  int name = sockopt_name(popSTACK());
  rawsock_t sock;
  stream_handles(popSTACK(),true,NULL,&sock,NULL);
  if (level == -1) {                      /* :ALL */
    pushSTACK(STACK_0);
    while (!endp(STACK_0)) {
      int level = sockopt_level(Car(STACK_0));
      STACK_0 = Cdr(STACK_0);
      if (!consp(STACK_0)) error_plist_odd(STACK_1);
      set_sock_opt_many(sock,level,name,Car(STACK_0));
      STACK_0 = Cdr(STACK_0);
    }
    skipSTACK(1);
  } else
    set_sock_opt_many(sock,level,name,STACK_0);
  VALUES1(popSTACK());
}
#endif

/* ================== CHECKSUM from Fred Cohen ================== */
/* these check sum functions operate on ethernet _frames_, i.e.:
   - 6 bytes of the destination MAC address
   - 6 bytes of the source MAC address
   - 2 bytes specifying the next level protocol (e.g., 0800 for IP)
   followed by an IP datagram, so the first 14 bytes are ignored. */
static unsigned short ipcsum (unsigned char* buffer, size_t length) {
  register long sum=0;          /* assumes long == 32 bits */
  unsigned short result;
  unsigned char *ptr=&(buffer[14]);
  unsigned int nbytes;
  ASSERT(length >= 26);         /* FIXME: is this right?! */
  buffer[24]=0;buffer[25]=0;nbytes=(buffer[14] & 0xF) << 2; /* checksum=0, headerlen */
  while(nbytes>1){sum += *ptr; ptr++; sum += *ptr <<8; ptr++; nbytes -= 2;}
  if(nbytes==1){sum += *ptr;}     /* mop up an odd byte,  if necessary */
  sum = (sum >> 16) + (sum & 0xFFFF);
  result=~(sum  + (sum >> 16)) & 0xFFFF;
  buffer[24]=(result & 0xFF);
  buffer[25]=((result >> 8) & 0xFF);
  return result;
}
DEFUN(RAWSOCK:IPCSUM, buffer &key :START :END,(subr_rawsock_ipcsum,seclass_default,1,0,norest,key,2,NIL)) { /* IP checksum */
  size_t length;
  with_buffer_arg(buffer,&STACK_2,&length,PROT_READ_WRITE,
                  length = ipcsum((unsigned char*)buffer,length));
  VALUES1(fixnum(length)); skipSTACK(1);
}

static unsigned short icmpcsum (unsigned char* buffer, size_t length) {
  register long sum=0;          /* assumes long == 32 bits */
  unsigned short result;
  unsigned char *ptr;
  unsigned int nbytes, off, offset;
  ASSERT(length >= 18);                    /* FIXME: is this right?! */
  off=((buffer[14]&0xF)<<2);offset=off+14; /* start of ICMP header */
  buffer[offset+2]=0;buffer[offset+3]=0;
  nbytes=(((buffer[16])<<8)+(buffer[17]))-off; /* bytes in ICMP part */
  ptr=&(buffer[offset]);
  while(nbytes>1){sum += *ptr; ptr++; sum += *ptr <<8; ptr++; nbytes -= 2;}
  if(nbytes==1){sum += *ptr;}     /* mop up an odd byte,  if necessary */
  sum = (sum >> 16) + (sum & 0xFFFF);
  result=~(sum  + (sum >> 16)) & 0xFFFF;
  buffer[offset+2]=(result & 0xFF);
  buffer[offset+3]=((result >> 8) & 0xFF);
  return result;
}
DEFUN(RAWSOCK:ICMPCSUM, buffer &key :START :END,(subr_rawsock_icmpcsum,seclass_default,1,0,norest,key,2,NIL)) { /* ICMP checksum */
  size_t length;
  with_buffer_arg(buffer,&STACK_2,&length,PROT_READ,
                  length = icmpcsum((unsigned char*)buffer,length));
  VALUES1(fixnum(length)); skipSTACK(1);
}

static unsigned short tcpcsum (unsigned char* buffer, size_t length) {
  register unsigned long sum;  /* assumes long == 32 bits */
  unsigned short result;
  unsigned char *ptr;
  unsigned int nbytes, packsize, offset;
  ASSERT(length >= 34);         /* FIXME: is this right?! */
  sum = (buffer[26]<<8)+ buffer[27]+(buffer[28]<<8)+ buffer[29]; /* Src IP */
  sum +=(buffer[30]<<8)+ buffer[31]+(buffer[32]<<8)+ buffer[33]; /* Dst IP */
  sum +=(buffer[23]);           /* zero followed by protocol */
  packsize=((buffer[16])<<8)+(buffer[17]); /* packet size - not including ARP area */
  offset=((buffer[14]&0xF)<<2); /* start of TCP header (rel to IP header) */
  sum +=(packsize - offset);    /* size of TCP part of the packet */
  ptr=&(buffer[offset+14]);     /* start of TCP header in buffer */
  nbytes=packsize-offset;       /* number of bytes to checksum */
  buffer[offset+16+14]=0;
  buffer[offset+17+14]=0; /* initialize TCP checksum to 0 */
  while(nbytes>1){sum += *ptr<<8; ptr++; sum += *ptr; ptr++; nbytes -= 2;}
  if (nbytes==1) {sum += *ptr<<8;} /* mop up an odd byte,  if necessary */
  sum = (sum >> 16) + (sum & 0xFFFF);
  result=~(sum  + (sum >> 16)) & 0xFFFF;
  buffer[offset+17+14]=(result & 0xFF);
  buffer[offset+16+14]=((result >> 8) & 0xFF);
  return result;
}
DEFUN(RAWSOCK:TCPCSUM, buffer &key :START :END,(subr_rawsock_tcpcsum,seclass_default,1,0,norest,key,2,NIL)) { /* TCP checksum */
  size_t length;
  with_buffer_arg(buffer,&STACK_2,&length,PROT_READ_WRITE,
                  length = tcpcsum((unsigned char*)buffer,length));
  VALUES1(fixnum(length)); skipSTACK(1);
}

static unsigned short udpcsum (unsigned char* buffer, size_t length) {
  register unsigned long sum = 0;  /* assumes long == 32 bits */
  unsigned short result;
  unsigned char *ptr;
  unsigned int nbytes, packsize, offset;
  ASSERT(length >= 34);         /* FIXME: is this right?! */
  sum = (buffer[26]<<8)+ buffer[27]+(buffer[28]<<8)+ buffer[29]; /* Src IP */
  sum +=(buffer[30]<<8)+ buffer[31]+(buffer[32]<<8)+ buffer[33]; /* Dst IP */
  sum +=(buffer[23]);           /* zero followed by protocol */
  packsize=((buffer[16])<<8)+(buffer[17]); /* packet size */
  offset=((buffer[14]&0xF)<<2);            /* start of UDP header */
  sum +=(((buffer[16])<<8)+(buffer[17])) -offset;
  ptr=&(buffer[offset+14]);     /* start of TCP header */
  nbytes=packsize-offset;
  buffer[offset+6+14]=0;
  buffer[offset+7+14]=0; /* initialize UDP checksum to 0 */
  while(nbytes>1){sum += *ptr <<8; ptr++; sum += *ptr; ptr++; nbytes -= 2;}
  if (nbytes==1) {sum += *ptr<<8;} /* mop up an odd byte, if necessary */
  sum = (sum >> 16) + (sum & 0xFFFF);
  result=~(sum  + (sum >> 16)) & 0xFFFF;
  buffer[offset+7+14]=(result & 0xFF);
  buffer[offset+6+14]=((result >> 8) & 0xFF);
  return result;
}
DEFUN(RAWSOCK:UDPCSUM, buffer &key :START :END,(subr_rawsock_udpcsum,seclass_default,1,0,norest,key,2,NIL)) { /* UDP checksum */
  size_t length;
  with_buffer_arg(buffer,&STACK_2,&length,PROT_READ_WRITE,
                  length = udpcsum((unsigned char*)buffer,length));
  VALUES1(fixnum(length)); skipSTACK(1);
}

#ifdef __GNUC__ /* to prevent a gcc-warning "statement with no effect" */
# define unused  (void)
#else
# define unused
#endif

void module__rawsock__init_function_2 (module_t* module);
void module__rawsock__init_function_2 (module_t* module) {
  unused module;
#if defined(WIN32_NATIVE)
  HMODULE ws2 = LoadLibrary("ws2_32.dll");
  if (ws2 != NULL) {
    freeaddrinfo_f = (freeaddrinfo_t) GetProcAddress(ws2,"freeaddrinfo");
    getaddrinfo_f = (getaddrinfo_t) GetProcAddress(ws2,"getaddrinfo");
    getnameinfo_f = (getnameinfo_t) GetProcAddress(ws2,"getnameinfo");
    gai_strerror_f = (gai_strerror_t) GetProcAddress(ws2,"gai_strerror");
  }
#endif
}


struct module__rawsock__subr_tab_t module__rawsock__subr_tab
  #if defined(HEAPCODES) && (alignment_long < varobject_alignment) && defined(__GNUC__)
    __attribute__ ((aligned (varobject_alignment)))
  #endif
  = {
  #if varobjects_misaligned
  { 0 },
  #endif
  LISPFUN_F(subr_rawsock_accept,seclass_default,2,0,norest,nokey,0,NIL)
  LISPFUN_F(subr_rawsock_bind,seclass_default,2,0,norest,nokey,0,NIL)
#if defined(HAVE_NET_IF_H)
  LISPFUN_F(subr_rawsock_configdev,seclass_default,3,0,norest,key,2,NIL)
#endif
  LISPFUN_F(subr_rawsock_connect,seclass_default,2,0,norest,nokey,0,NIL)
  LISPFUN_F(subr_rawsock_convert_address,seclass_default,2,0,norest,nokey,0,NIL)
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  LISPFUN_F(subr_rawsock_getaddrinfo,seclass_default,0,0,norest,key,12,NIL)
#endif
#if defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)
  LISPFUN_F(subr_rawsock_getnameinfo,seclass_default,1,0,norest,key,6,NIL)
#endif
  LISPFUN_F(subr_rawsock_getpeername,seclass_default,2,0,norest,nokey,0,NIL)
  LISPFUN_F(subr_rawsock_getsockname,seclass_default,2,0,norest,nokey,0,NIL)
  LISPFUN_F(subr_rawsock_htonl,seclass_default,1,0,norest,nokey,0,NIL)
  LISPFUN_F(subr_rawsock_htons,seclass_default,1,0,norest,nokey,0,NIL)
  LISPFUN_F(subr_rawsock_icmpcsum,seclass_default,1,0,norest,key,2,NIL)
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
  LISPFUN_F(subr_rawsock_ifaddrs,seclass_default,0,0,norest,key,2,NIL)
#endif
#if defined(HAVE_NET_IF_H)
  LISPFUN_F(subr_rawsock_if_name_index,seclass_default,0,1,norest,nokey,0,NIL)
#endif
  LISPFUN_F(subr_rawsock_ipcsum,seclass_default,1,0,norest,key,2,NIL)
  LISPFUN_F(subr_rawsock_make_sockaddr,seclass_default,1,1,norest,nokey,0,NIL)
#if defined(HAVE_NETDB_H)
  LISPFUN_F(subr_rawsock_network,seclass_default,0,2,norest,nokey,0,NIL)
#endif
  LISPFUN_F(subr_rawsock_ntohl,seclass_default,1,0,norest,nokey,0,NIL)
  LISPFUN_F(subr_rawsock_ntohs,seclass_default,1,0,norest,nokey,0,NIL)
#if defined(HAVE_NETDB_H)
  LISPFUN_F(subr_rawsock_protocol,seclass_default,0,1,norest,nokey,0,NIL)
#endif
  LISPFUN_F(subr_rawsock_recv,seclass_default,2,0,norest,key,5,NIL)
  LISPFUN_F(subr_rawsock_recvfrom,seclass_default,3,0,norest,key,5,NIL)
#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
  LISPFUN_F(subr_rawsock_recvmsg,seclass_default,2,0,norest,key,5,NIL)
#endif
  LISPFUN_F(subr_rawsock_send,seclass_default,2,0,norest,key,4,NIL)
#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
  LISPFUN_F(subr_rawsock_sendmsg,seclass_default,2,0,norest,key,4,NIL)
#endif
  LISPFUN_F(subr_rawsock_sendto,seclass_default,3,0,norest,key,4,NIL)
#if defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)
  LISPFUN_F(subr_rawsock_set_socket_option,seclass_default,3,0,norest,key,1,NIL)
#endif
  LISPFUN_F(subr_rawsock_sockaddr_family,seclass_default,1,0,norest,nokey,0,NIL)
  LISPFUN_F(subr_rawsock_sockaddr_slot,seclass_default,0,1,norest,nokey,0,NIL)
#if defined(HAVE_SOCKATMARK)
  LISPFUN_F(subr_rawsock_sockatmark,seclass_default,1,0,norest,nokey,0,NIL)
#endif
  LISPFUN_F(subr_rawsock_socket,seclass_default,3,0,norest,nokey,0,NIL)
  LISPFUN_F(subr_rawsock_socketpair,seclass_default,3,0,norest,nokey,0,NIL)
#if defined(HAVE_GETSOCKOPT) || defined(WIN32_NATIVE)
  LISPFUN_F(subr_rawsock_socket_option,seclass_default,2,0,norest,key,1,NIL)
#endif
  LISPFUN_F(subr_rawsock_sock_close,seclass_default,1,0,norest,nokey,0,NIL)
  LISPFUN_F(subr_rawsock_sock_listen,seclass_default,1,1,norest,nokey,0,NIL)
  LISPFUN_F(subr_rawsock_sock_read,seclass_default,2,0,norest,key,2,NIL)
  LISPFUN_F(subr_rawsock_sock_write,seclass_default,2,0,norest,key,2,NIL)
  LISPFUN_F(subr_rawsock_tcpcsum,seclass_default,1,0,norest,key,2,NIL)
  LISPFUN_F(subr_rawsock_udpcsum,seclass_default,1,0,norest,key,2,NIL)
  0
};
uintC module__rawsock__subr_tab_size = (sizeof(struct module__rawsock__subr_tab_t)-varobjects_misaligned-sizeof(int))/sizeof(subr_t);

struct module__rawsock__subr_tab_initdata_t {
  subr_initdata_t _subr_rawsock_accept;
  subr_initdata_t _subr_rawsock_bind;
#if defined(HAVE_NET_IF_H)
  subr_initdata_t _subr_rawsock_configdev;
#endif
  subr_initdata_t _subr_rawsock_connect;
  subr_initdata_t _subr_rawsock_convert_address;
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  subr_initdata_t _subr_rawsock_getaddrinfo;
#endif
#if defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)
  subr_initdata_t _subr_rawsock_getnameinfo;
#endif
  subr_initdata_t _subr_rawsock_getpeername;
  subr_initdata_t _subr_rawsock_getsockname;
  subr_initdata_t _subr_rawsock_htonl;
  subr_initdata_t _subr_rawsock_htons;
  subr_initdata_t _subr_rawsock_icmpcsum;
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
  subr_initdata_t _subr_rawsock_ifaddrs;
#endif
#if defined(HAVE_NET_IF_H)
  subr_initdata_t _subr_rawsock_if_name_index;
#endif
  subr_initdata_t _subr_rawsock_ipcsum;
  subr_initdata_t _subr_rawsock_make_sockaddr;
#if defined(HAVE_NETDB_H)
  subr_initdata_t _subr_rawsock_network;
#endif
  subr_initdata_t _subr_rawsock_ntohl;
  subr_initdata_t _subr_rawsock_ntohs;
#if defined(HAVE_NETDB_H)
  subr_initdata_t _subr_rawsock_protocol;
#endif
  subr_initdata_t _subr_rawsock_recv;
  subr_initdata_t _subr_rawsock_recvfrom;
#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
  subr_initdata_t _subr_rawsock_recvmsg;
#endif
  subr_initdata_t _subr_rawsock_send;
#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
  subr_initdata_t _subr_rawsock_sendmsg;
#endif
  subr_initdata_t _subr_rawsock_sendto;
#if defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)
  subr_initdata_t _subr_rawsock_set_socket_option;
#endif
  subr_initdata_t _subr_rawsock_sockaddr_family;
  subr_initdata_t _subr_rawsock_sockaddr_slot;
#if defined(HAVE_SOCKATMARK)
  subr_initdata_t _subr_rawsock_sockatmark;
#endif
  subr_initdata_t _subr_rawsock_socket;
  subr_initdata_t _subr_rawsock_socketpair;
#if defined(HAVE_GETSOCKOPT) || defined(WIN32_NATIVE)
  subr_initdata_t _subr_rawsock_socket_option;
#endif
  subr_initdata_t _subr_rawsock_sock_close;
  subr_initdata_t _subr_rawsock_sock_listen;
  subr_initdata_t _subr_rawsock_sock_read;
  subr_initdata_t _subr_rawsock_sock_write;
  subr_initdata_t _subr_rawsock_tcpcsum;
  subr_initdata_t _subr_rawsock_udpcsum;
  int _dummy_to_avoid_trailing_comma_in_initializer;
} module__rawsock__subr_tab_initdata = {
  { "RAWSOCK", "ACCEPT" },
  { "RAWSOCK", "BIND" },
#if defined(HAVE_NET_IF_H)
  { "RAWSOCK", "CONFIGDEV" },
#endif
  { "RAWSOCK", "CONNECT" },
  { "RAWSOCK", "CONVERT-ADDRESS" },
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  { "RAWSOCK", "GETADDRINFO" },
#endif
#if defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)
  { "RAWSOCK", "GETNAMEINFO" },
#endif
  { "RAWSOCK", "GETPEERNAME" },
  { "RAWSOCK", "GETSOCKNAME" },
  { "RAWSOCK", "HTONL" },
  { "RAWSOCK", "HTONS" },
  { "RAWSOCK", "ICMPCSUM" },
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
  { "RAWSOCK", "IFADDRS" },
#endif
#if defined(HAVE_NET_IF_H)
  { "RAWSOCK", "IF-NAME-INDEX" },
#endif
  { "RAWSOCK", "IPCSUM" },
  { "RAWSOCK", "MAKE-SOCKADDR" },
#if defined(HAVE_NETDB_H)
  { "RAWSOCK", "NETWORK" },
#endif
  { "RAWSOCK", "NTOHL" },
  { "RAWSOCK", "NTOHS" },
#if defined(HAVE_NETDB_H)
  { "RAWSOCK", "PROTOCOL" },
#endif
  { "RAWSOCK", "RECV" },
  { "RAWSOCK", "RECVFROM" },
#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
  { "RAWSOCK", "RECVMSG" },
#endif
  { "RAWSOCK", "SEND" },
#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
  { "RAWSOCK", "SENDMSG" },
#endif
  { "RAWSOCK", "SENDTO" },
#if defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)
  { "RAWSOCK", "SET-SOCKET-OPTION" },
#endif
  { "RAWSOCK", "SOCKADDR-FAMILY" },
  { "RAWSOCK", "SOCKADDR-SLOT" },
#if defined(HAVE_SOCKATMARK)
  { "RAWSOCK", "SOCKATMARK" },
#endif
  { "RAWSOCK", "SOCKET" },
  { "RAWSOCK", "SOCKETPAIR" },
#if defined(HAVE_GETSOCKOPT) || defined(WIN32_NATIVE)
  { "RAWSOCK", "SOCKET-OPTION" },
#endif
  { "RAWSOCK", "SOCK-CLOSE" },
  { "RAWSOCK", "SOCK-LISTEN" },
  { "RAWSOCK", "SOCK-READ" },
  { "RAWSOCK", "SOCK-WRITE" },
  { "RAWSOCK", "TCPCSUM" },
  { "RAWSOCK", "UDPCSUM" },
  0
};

void module__rawsock__init_function_1 (module_t* module);
void module__rawsock__init_function_1 (module_t* module)
{
#if defined(HAVE_NET_IF_H)
  pushSTACK(O(object_Kpromisc));
  pushSTACK(O(object_Knoarp));
  module__rawsock__subr_tab._subr_rawsock_configdev.keywords = vectorof(2);
#endif
#if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE)
  pushSTACK(O(object_Knode));
  pushSTACK(O(object_Kservice));
  pushSTACK(O(object_Kprotocol));
  pushSTACK(O(object_Ksocktype));
  pushSTACK(O(object_Kfamily));
  pushSTACK(O(object_Kpassive));
  pushSTACK(O(object_Kcanonname));
  pushSTACK(O(object_Knumerichost));
  pushSTACK(O(object_Knumericserv));
  pushSTACK(O(object_Kv4mapped));
  pushSTACK(O(object_Kall));
  pushSTACK(O(object_Kaddrconfig));
  module__rawsock__subr_tab._subr_rawsock_getaddrinfo.keywords = vectorof(12);
#endif
#if defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE)
  pushSTACK(O(object_Knofqdn));
  pushSTACK(O(object_Knumerichost));
  pushSTACK(O(object_Knamereqd));
  pushSTACK(O(object_Knumericserv));
  pushSTACK(O(object_Knumericscope));
  pushSTACK(O(object_Kdgram));
  module__rawsock__subr_tab._subr_rawsock_getnameinfo.keywords = vectorof(6);
#endif
  pushSTACK(O(object_Kstart));
  pushSTACK(O(object_Kend));
  module__rawsock__subr_tab._subr_rawsock_icmpcsum.keywords = vectorof(2);
#if defined(HAVE_NET_IF_H) && defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
  pushSTACK(O(object_Kflags_and));
  pushSTACK(O(object_Kflags_or));
  module__rawsock__subr_tab._subr_rawsock_ifaddrs.keywords = vectorof(2);
#endif
  pushSTACK(O(object_Kstart));
  pushSTACK(O(object_Kend));
  module__rawsock__subr_tab._subr_rawsock_ipcsum.keywords = vectorof(2);
  pushSTACK(O(object_Kstart));
  pushSTACK(O(object_Kend));
  pushSTACK(O(object_Kpeek));
  pushSTACK(O(object_Koob));
  pushSTACK(O(object_Kwaitall));
  module__rawsock__subr_tab._subr_rawsock_recv.keywords = vectorof(5);
  pushSTACK(O(object_Kstart));
  pushSTACK(O(object_Kend));
  pushSTACK(O(object_Kpeek));
  pushSTACK(O(object_Koob));
  pushSTACK(O(object_Kwaitall));
  module__rawsock__subr_tab._subr_rawsock_recvfrom.keywords = vectorof(5);
#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
  pushSTACK(O(object_Kstart));
  pushSTACK(O(object_Kend));
  pushSTACK(O(object_Kpeek));
  pushSTACK(O(object_Koob));
  pushSTACK(O(object_Kwaitall));
  module__rawsock__subr_tab._subr_rawsock_recvmsg.keywords = vectorof(5);
#endif
  pushSTACK(O(object_Kstart));
  pushSTACK(O(object_Kend));
  pushSTACK(O(object_Koob));
  pushSTACK(O(object_Keor));
  module__rawsock__subr_tab._subr_rawsock_send.keywords = vectorof(4);
#if defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) && defined(HAVE_STRUCT_MSGHDR_MSG_FLAGS) && defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(HAVE_SYS_UIO_H)
  pushSTACK(O(object_Kstart));
  pushSTACK(O(object_Kend));
  pushSTACK(O(object_Koob));
  pushSTACK(O(object_Keor));
  module__rawsock__subr_tab._subr_rawsock_sendmsg.keywords = vectorof(4);
#endif
  pushSTACK(O(object_Kstart));
  pushSTACK(O(object_Kend));
  pushSTACK(O(object_Koob));
  pushSTACK(O(object_Keor));
  module__rawsock__subr_tab._subr_rawsock_sendto.keywords = vectorof(4);
#if defined(HAVE_SETSOCKOPT) || defined(WIN32_NATIVE)
  pushSTACK(O(object_Klevel));
  module__rawsock__subr_tab._subr_rawsock_set_socket_option.keywords = vectorof(1);
#endif
#if defined(HAVE_GETSOCKOPT) || defined(WIN32_NATIVE)
  pushSTACK(O(object_Klevel));
  module__rawsock__subr_tab._subr_rawsock_socket_option.keywords = vectorof(1);
#endif
  pushSTACK(O(object_Kstart));
  pushSTACK(O(object_Kend));
  module__rawsock__subr_tab._subr_rawsock_sock_read.keywords = vectorof(2);
  pushSTACK(O(object_Kstart));
  pushSTACK(O(object_Kend));
  module__rawsock__subr_tab._subr_rawsock_sock_write.keywords = vectorof(2);
  pushSTACK(O(object_Kstart));
  pushSTACK(O(object_Kend));
  module__rawsock__subr_tab._subr_rawsock_tcpcsum.keywords = vectorof(2);
  pushSTACK(O(object_Kstart));
  pushSTACK(O(object_Kend));
  module__rawsock__subr_tab._subr_rawsock_udpcsum.keywords = vectorof(2);
}

void module__rawsock__fini_function (module_t* module);
void module__rawsock__fini_function (module_t* module)
{
}
