ndisc.h revision 8d6b59704591ba9fad57751858835dc332dbdd37
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_NET_NDISC_H_ 6#define SHILL_NET_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 } 19 uint8_t type; 20 uint8_t length; 21 uint16_t reserved; 22 uint32_t lifetime; 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 29// Infinity lifetime. 30#define ND_OPT_LIFETIME_INFINITY 0xFFFFFFFF 31 32#endif // SHILL_NET_NDISC_H_ 33