File: in.h

package info (click to toggle)
klibc 2.0.14-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,204 kB
  • sloc: ansic: 48,657; asm: 2,204; perl: 693; makefile: 220; sh: 177
file content (38 lines) | stat: -rw-r--r-- 755 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * netinet/in.h
 */

#ifndef _NETINET_IN_H
#define _NETINET_IN_H

#include <sys/types.h>
#include <klibc/extern.h>
#include <stdint.h>
#include <endian.h>		/* Must be included *before* <linux/in.h> */
#include <sys/socket.h>		/* Must be included *before* <linux/in.h> */
#include <linux/in.h>

#ifndef htons
# define htons(x)	__cpu_to_be16(x)
#endif
#ifndef ntohs
# define ntohs(x)	__be16_to_cpu(x)
#endif
#ifndef htonl
# define htonl(x)	__cpu_to_be32(x)
#endif
#ifndef ntohl
# define ntohl(x)	__be32_to_cpu(x)
#endif
#ifndef htonq
# define htonq(x)	__cpu_to_be64(x)
#endif
#ifndef ntohq
# define ntohq(x)	__be64_to_cpu(x)
#endif

#define IPPORT_RESERVED	1024

__extern int bindresvport(int sd, struct sockaddr_in *sin);

#endif				/* _NETINET_IN_H */