1/* $OpenBSD: if_sec.h,v 1.2 2025/03/04 15:11:30 bluhm Exp $ */
2
3/*
4 * Copyright (c) 2023 David Gwynne <dlg@openbsd.org>
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19#ifndef _NET_IF_SEC_H
20#define _NET_IF_SEC_H
21
22#ifdef _KERNEL
23struct sec_softc;
24struct tdb;
25
26/*
27 * let the IPsec stack hand packets to sec(4) for input
28 */
29
30struct sec_softc *sec_get(unsigned int);
31void sec_input(struct sec_softc * , int, int,
32 struct mbuf *, struct netstack *);
33void sec_put(struct sec_softc *);
34
35/*
36 * let the IPsec stack give tdbs to sec(4) for output
37 */
38
39void sec_tdb_insert(struct tdb *);
40void sec_tdb_remove(struct tdb *);
41
42#endif /* _KERNEL */
43
44#endif /* _NET_IF_SEC_H */