You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
849 B

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __NET_SOCKET_MISK_HEADER__
  2. #define __NET_SOCKET_MISK_HEADER__
  3. #include <stdio.h>
  4. #include <sys/types.h>
  5. #include <sys/socket.h>
  6. #include <netinet/in.h>
  7. #include <unistd.h>
  8. typedef struct {
  9. short sin_family; /* must be AF_INET */
  10. unsigned short sin_port;
  11. struct in_addr sin_addr;
  12. char sin_zero[8]; /* Not used, must be zero */
  13. } sockaddr_in_ex;
  14. struct hostent {
  15. char *h_name; /* official name of host */
  16. char **h_aliases; /* alias list */
  17. int h_addrtype; /* host address type */
  18. int h_length; /* length of address */
  19. char **h_addr_list; /* list of addresses from name server */
  20. #define h_addr h_addr_list[0] /* address, for backward compatiblity */
  21. };
  22. #endif