1 | /* SPDX-License-Identifier: BSD-3-Clause */ |
2 | /* |
3 | * Definitions and prototypes for SLIRP stateless DHCPv6 |
4 | * |
5 | * Copyright 2016 Thomas Huth, Red Hat Inc. |
6 | * |
7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions |
9 | * are met: |
10 | * |
11 | * 1. Redistributions of source code must retain the above |
12 | * copyright notice, this list of conditions and the following |
13 | * disclaimer. |
14 | * |
15 | * 2. Redistributions in binary form must reproduce the above |
16 | * copyright notice, this list of conditions and the following |
17 | * disclaimer in the documentation and/or other materials provided |
18 | * with the distribution. |
19 | * |
20 | * 3. Neither the name of the copyright holder nor the names of its |
21 | * contributors may be used to endorse or promote products derived |
22 | * from this software without specific prior written permission. |
23 | * |
24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
25 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
26 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
27 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
28 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
29 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
30 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
32 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
33 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
35 | * OF THE POSSIBILITY OF SUCH DAMAGE. |
36 | */ |
37 | #ifndef SLIRP_DHCPV6_H |
38 | #define SLIRP_DHCPV6_H |
39 | |
40 | #define DHCPV6_SERVER_PORT 547 |
41 | |
42 | #define ALLDHCP_MULTICAST \ |
43 | { \ |
44 | .s6_addr = { \ |
45 | 0xff, \ |
46 | 0x02, \ |
47 | 0x00, \ |
48 | 0x00, \ |
49 | 0x00, \ |
50 | 0x00, \ |
51 | 0x00, \ |
52 | 0x00, \ |
53 | 0x00, \ |
54 | 0x00, \ |
55 | 0x00, \ |
56 | 0x00, \ |
57 | 0x00, \ |
58 | 0x01, \ |
59 | 0x00, \ |
60 | 0x02 \ |
61 | } \ |
62 | } |
63 | |
64 | #define in6_dhcp_multicast(a) in6_equal(a, &(struct in6_addr)ALLDHCP_MULTICAST) |
65 | |
66 | void dhcpv6_input(struct sockaddr_in6 *srcsas, struct mbuf *m); |
67 | |
68 | #endif |
69 | |