blob: 4640bcdec01a2ba7f1b0db6051552e11692f3389 [file] [log] [blame]
Peter Qiu3ef4f532014-07-25 15:31:44 -07001// 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.
15struct NDUserOptionHeader {
16 NDUserOptionHeader() {
17 memset(this, 0, sizeof(*this));
18 }
Ben Chan7fab8972014-08-10 17:14:46 -070019 uint8_t type;
20 uint8_t length;
21 uint16_t reserved;
22 uint32_t lifetime;
Peter Qiu3ef4f532014-07-25 15:31:44 -070023} __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 Qiu98551702014-07-28 13:28:53 -070029// Infinity lifetime.
30#define ND_OPT_LIFETIME_INFINITY 0xFFFFFFFF
31
Peter Qiu3ef4f532014-07-25 15:31:44 -070032#endif // SHILL_NDISC_H_