xref: /freebsd/sys/dev/wg/if_wg.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
1*744bfb21SJohn Baldwin /* SPDX-License-Identifier: ISC
2*744bfb21SJohn Baldwin  *
3*744bfb21SJohn Baldwin  * Copyright (c) 2019 Matt Dunwoodie <ncon@noconroy.net>
4*744bfb21SJohn Baldwin  *
5*744bfb21SJohn Baldwin  * Permission to use, copy, modify, and distribute this software for any
6*744bfb21SJohn Baldwin  * purpose with or without fee is hereby granted, provided that the above
7*744bfb21SJohn Baldwin  * copyright notice and this permission notice appear in all copies.
8*744bfb21SJohn Baldwin  *
9*744bfb21SJohn Baldwin  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10*744bfb21SJohn Baldwin  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*744bfb21SJohn Baldwin  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12*744bfb21SJohn Baldwin  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*744bfb21SJohn Baldwin  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*744bfb21SJohn Baldwin  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15*744bfb21SJohn Baldwin  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16*744bfb21SJohn Baldwin  */
17*744bfb21SJohn Baldwin 
18*744bfb21SJohn Baldwin #ifndef __IF_WG_H__
19*744bfb21SJohn Baldwin #define __IF_WG_H__
20*744bfb21SJohn Baldwin 
21*744bfb21SJohn Baldwin #include <net/if.h>
22*744bfb21SJohn Baldwin #include <netinet/in.h>
23*744bfb21SJohn Baldwin 
24*744bfb21SJohn Baldwin struct wg_data_io {
25*744bfb21SJohn Baldwin 	char	 wgd_name[IFNAMSIZ];
26*744bfb21SJohn Baldwin 	void	*wgd_data;
27*744bfb21SJohn Baldwin 	size_t	 wgd_size;
28*744bfb21SJohn Baldwin };
29*744bfb21SJohn Baldwin 
30*744bfb21SJohn Baldwin #define WG_KEY_SIZE	32
31*744bfb21SJohn Baldwin 
32*744bfb21SJohn Baldwin #define SIOCSWG _IOWR('i', 210, struct wg_data_io)
33*744bfb21SJohn Baldwin #define SIOCGWG _IOWR('i', 211, struct wg_data_io)
34*744bfb21SJohn Baldwin 
35*744bfb21SJohn Baldwin #endif /* __IF_WG_H__ */
36