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.

28 lines
711 B

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