Peter Qiu | 3ef4f53 | 2014-07-25 15:31:44 -0700 | [diff] [blame] | 1 | // Copyright (c) 2014 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef SHILL_NDISC_H_ |
| 6 | #define SHILL_NDISC_H_ |
| 7 | |
| 8 | // Neighbor discovery related definitions. This is needed because kernel |
| 9 | // currently does not export these definitions to the user space. |
| 10 | |
| 11 | // Netlink multicast group for neighbor discovery user option message. |
| 12 | #define RTMGRP_ND_USEROPT 0x80000 |
| 13 | |
| 14 | // Neighbor Discovery user option header definition. |
| 15 | struct NDUserOptionHeader { |
| 16 | NDUserOptionHeader() { |
| 17 | memset(this, 0, sizeof(*this)); |
| 18 | } |
Ben Chan | 7fab897 | 2014-08-10 17:14:46 -0700 | [diff] [blame^] | 19 | uint8_t type; |
| 20 | uint8_t length; |
| 21 | uint16_t reserved; |
| 22 | uint32_t lifetime; |
Peter Qiu | 3ef4f53 | 2014-07-25 15:31:44 -0700 | [diff] [blame] | 23 | } __attribute__((__packed__)); |
| 24 | |
| 25 | // Neighbor Discovery user option type definition. |
| 26 | #define ND_OPT_RDNSS 25 /* RFC 5006 */ |
| 27 | #define ND_OPT_DNSSL 31 /* RFC 6106 */ |
| 28 | |
Peter Qiu | 9855170 | 2014-07-28 13:28:53 -0700 | [diff] [blame] | 29 | // Infinity lifetime. |
| 30 | #define ND_OPT_LIFETIME_INFINITY 0xFFFFFFFF |
| 31 | |
Peter Qiu | 3ef4f53 | 2014-07-25 15:31:44 -0700 | [diff] [blame] | 32 | #endif // SHILL_NDISC_H_ |