• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright (C) 2014 The Android Open Source Project
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //      http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 #ifndef SHILL_NET_NDISC_H_
18 #define SHILL_NET_NDISC_H_
19 
20 // Neighbor discovery related definitions. This is needed because kernel
21 // currently does not export these definitions to the user space.
22 
23 // Netlink multicast group for neighbor discovery user option message.
24 #define RTMGRP_ND_USEROPT 0x80000
25 
26 // Neighbor Discovery user option header definition.
27 struct NDUserOptionHeader {
NDUserOptionHeaderNDUserOptionHeader28   NDUserOptionHeader() {
29     memset(this, 0, sizeof(*this));
30   }
31   uint8_t type;
32   uint8_t length;
33   uint16_t reserved;
34   uint32_t lifetime;
35 } __attribute__((__packed__));
36 
37 // Neighbor Discovery user option type definition.
38 #define ND_OPT_RDNSS 25       /* RFC 5006 */
39 #define ND_OPT_DNSSL 31       /* RFC 6106 */
40 
41 // Infinity lifetime.
42 #define ND_OPT_LIFETIME_INFINITY 0xFFFFFFFF
43 
44 #endif  // SHILL_NET_NDISC_H_
45