File: in.h

package info (click to toggle)
syslinux 3%3A6.04~git20190206.bf6db5b4%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 16,940 kB
  • sloc: ansic: 189,351; asm: 5,148; pascal: 4,825; perl: 1,980; makefile: 1,980; python: 266; sh: 176; xml: 39
file content (27 lines) | stat: -rw-r--r-- 554 bytes parent folder | download | duplicates (7)
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
#ifndef _NETINET_IN_H
#define _NETINET_IN_H

/* COM32 will be running on an i386 platform */

#include <klibc/compiler.h>
#include <klibc/extern.h>
#include <stdint.h>
#include <byteswap.h>

#define htons(x) cpu_to_be16(x)
#define ntohs(x) be16_to_cpu(x)
#define htonl(x) cpu_to_be32(x)
#define ntohl(x) be32_to_cpu(x)
#define htonq(x) cpu_to_be64(x)
#define ntohq(x) be64_to_cpu(x)

typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;

struct in_addr {
    in_addr_t s_addr;
};

__extern char *inet_ntoa(struct in_addr);

#endif /* _NETINET_IN_H */