libctru  v2.4.1
in.h
1 #pragma once
2 
3 #include <stdint.h>
4 #include <sys/socket.h>
5 
6 #define INADDR_LOOPBACK 0x7f000001
7 #define INADDR_ANY 0x00000000
8 #define INADDR_BROADCAST 0xFFFFFFFF
9 #define INADDR_NONE 0xFFFFFFFF
10 
11 #define INET_ADDRSTRLEN 16
12 
13 /*
14  * Protocols (See RFC 1700 and the IANA)
15  */
16 #define IPPROTO_IP 0 /* dummy for IP */
17 #define IPPROTO_UDP 17 /* user datagram protocol */
18 #define IPPROTO_TCP 6 /* tcp */
19 
20 #define IP_TOS 7
21 #define IP_TTL 8
22 #define IP_MULTICAST_LOOP 9
23 #define IP_MULTICAST_TTL 10
24 #define IP_ADD_MEMBERSHIP 11
25 #define IP_DROP_MEMBERSHIP 12
26 
27 typedef uint16_t in_port_t;
28 typedef uint32_t in_addr_t;
29 
30 struct in_addr {
31  in_addr_t s_addr;
32 };
33 
34 struct sockaddr_in {
35  sa_family_t sin_family;
36  in_port_t sin_port;
37  struct in_addr sin_addr;
38  unsigned char sin_zero[8];
39 };
40 
41 /* Request struct for multicast socket ops */
42 struct ip_mreq {
43  struct in_addr imr_multiaddr; /* IP multicast address of group */
44  struct in_addr imr_interface; /* local IP address of interface */
45 };
Definition: in.h:30
Definition: in.h:42
Definition: in.h:34