File: ipv6.h

package info (click to toggle)
bglibs 2.04%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,368 kB
  • sloc: ansic: 15,820; perl: 674; sh: 64; makefile: 26
file content (29 lines) | stat: -rw-r--r-- 699 bytes parent folder | download | duplicates (4)
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
#ifndef NET__IPV6__H__
#define NET__IPV6__H__

#include "sysdeps.h"

/** \defgroup ipv6 ipv6: IPv6 Address Handling

@{ */

/** IPv6 address structure. */
typedef struct {
  /** 128-bit IPv6 address, represented as 16 8-bit \c unsigned \c chars. */
  uint8 addr[16];
} ipv6addr;
/** IPv6 port number. */
typedef uint16 ipv6port;

extern const ipv6addr IPV6ADDR_ANY;
extern const ipv6addr IPV6ADDR_LOOPBACK;
extern const ipv6addr IPV6ADDR_V4PREFIX;

extern const char* ipv6_scan(const char* s, ipv6addr* addr);
extern const char* ipv6_format(const ipv6addr* addr);
extern unsigned fmt_ipv6addr(char* buffer, const ipv6addr* addr);
extern int ipv6_isv4mapped(const ipv6addr* addr);

/** @} */

#endif