1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#pragma once #include <sys/socket.h> #define IPPROTO_TCP 1 #define IPPROTO_UDP 2 #define IPPROTO_IP 4 struct in_addr { in_addr_t s_addr; }; struct sockaddr_in { sa_family_t sin_family; /* AF_INET */ in_port_t sin_port; struct in_addr sin_addr; };