Put IPv6 header NextHeader field definitions into header
Instead of hardwire 43 and 44 constants, it's better to copy the
definitions from include/net/ipv6.h from kernel.
Closes: https://github.com/iputils/iputils/pull/256
Reviewed-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
Petr Vorel authored 4 years ago
Petr Vorel committed 3 years ago
|
0 |
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
1 |
/*
|
|
2 |
* Copyright (c) 2020 Petr Vorel <petr.vorel@gmail.com>
|
|
3 |
*/
|
|
4 |
|
|
5 |
#ifndef IPV6_H
|
|
6 |
#define IPV6_H
|
|
7 |
|
|
8 |
/* Definitions from kernel include/net/ipv6.h */
|
|
9 |
|
|
10 |
/*
|
|
11 |
* NextHeader field of IPv6 header
|
|
12 |
*/
|
|
13 |
|
|
14 |
#define NEXTHDR_HOP 0 /* Hop-by-hop option header. */
|
|
15 |
#define NEXTHDR_TCP 6 /* TCP segment. */
|
|
16 |
#define NEXTHDR_UDP 17 /* UDP message. */
|
|
17 |
#define NEXTHDR_IPV6 41 /* IPv6 in IPv6 */
|
|
18 |
#define NEXTHDR_ROUTING 43 /* Routing header. */
|
|
19 |
#define NEXTHDR_FRAGMENT 44 /* Fragmentation/reassembly header. */
|
|
20 |
#define NEXTHDR_GRE 47 /* GRE header. */
|
|
21 |
#define NEXTHDR_ESP 50 /* Encapsulating security payload. */
|
|
22 |
#define NEXTHDR_AUTH 51 /* Authentication header. */
|
|
23 |
#define NEXTHDR_ICMP 58 /* ICMP for IPv6. */
|
|
24 |
#define NEXTHDR_NONE 59 /* No next header */
|
|
25 |
#define NEXTHDR_DEST 60 /* Destination options header. */
|
|
26 |
#define NEXTHDR_SCTP 132 /* SCTP message. */
|
|
27 |
#define NEXTHDR_MOBILITY 135 /* Mobility header. */
|
|
28 |
|
|
29 |
#endif /* IPV6_H */
|