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.

in.h 542B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef _IN_H
  2. #define _IN_H
  3. #include "stdint.h"
  4. #include <if_ether.h>
  5. #define IP ETH_P_IP
  6. #define ARP ETH_P_ARP
  7. #define RARP ETH_P_RARP
  8. #define IP_ICMP 1
  9. #define IP_IGMP 2
  10. #define IP_TCP 6
  11. #define IP_UDP 17
  12. /* Same after going through htonl */
  13. #define IP_BROADCAST 0xFFFFFFFF
  14. struct in_addr {
  15. uint32_t s_addr;
  16. };
  17. typedef struct in_addr in_addr;
  18. typedef uint16_t in_port_t;
  19. struct sockaddr_in {
  20. struct in_addr sin_addr;
  21. in_port_t sin_port;
  22. };
  23. extern int inet_aton ( const char *cp, struct in_addr *inp );
  24. #endif /* _IN_H */