Path: blob/a-new-beginning/SharedDependencies/Sources/libslirp/include/dhcpv6.h
2 views
/* SPDX-License-Identifier: BSD-3-Clause */1/*2* Definitions and prototypes for SLIRP stateless DHCPv63*4* Copyright 2016 Thomas Huth, Red Hat Inc.5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions8* are met:9*10* 1. Redistributions of source code must retain the above11* copyright notice, this list of conditions and the following12* disclaimer.13*14* 2. Redistributions in binary form must reproduce the above15* copyright notice, this list of conditions and the following16* disclaimer in the documentation and/or other materials provided17* with the distribution.18*19* 3. Neither the name of the copyright holder nor the names of its20* contributors may be used to endorse or promote products derived21* from this software without specific prior written permission.22*23* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS24* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT25* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS26* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE27* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,28* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES29* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR30* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)31* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,32* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)33* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED34* OF THE POSSIBILITY OF SUCH DAMAGE.35*/36#ifndef SLIRP_DHCPV6_H37#define SLIRP_DHCPV6_H3839#define DHCPV6_SERVER_PORT 5474041#define ALLDHCP_MULTICAST \42{ \43.s6_addr = { \440xff, \450x02, \460x00, \470x00, \480x00, \490x00, \500x00, \510x00, \520x00, \530x00, \540x00, \550x00, \560x00, \570x01, \580x00, \590x02 \60} \61}6263#define in6_dhcp_multicast(a) in6_equal(a, &(struct in6_addr)ALLDHCP_MULTICAST)6465/* Process a DHCPv6 packet from the guest */66void dhcpv6_input(struct sockaddr_in6 *srcsas, struct mbuf *m);6768#endif697071