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