summaryrefslogtreecommitdiff
path: root/sys/net/if_enc.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_enc.h')
-rw-r--r--sys/net/if_enc.h59
1 files changed, 23 insertions, 36 deletions
diff --git a/sys/net/if_enc.h b/sys/net/if_enc.h
index 07db984296f..9220ded4445 100644
--- a/sys/net/if_enc.h
+++ b/sys/net/if_enc.h
@@ -1,46 +1,32 @@
-/* $OpenBSD: if_enc.h,v 1.8 2001/06/25 05:14:00 angelos Exp $ */
+/* $OpenBSD: if_enc.h,v 1.9 2010/06/29 21:28:37 reyk Exp $ */
+
/*
- * The authors of this code are John Ioannidis (ji@tla.org),
- * Angelos D. Keromytis (kermit@csd.uch.gr) and
- * Niels Provos (provos@physnet.uni-hamburg.de).
- *
- * This code was written by John Ioannidis for BSD/OS in Athens, Greece,
- * in November 1995.
- *
- * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
- * by Angelos D. Keromytis.
- *
- * Additional transforms and features in 1997 and 1998 by Angelos D. Keromytis
- * and Niels Provos.
+ * Copyright (c) 2010 Reyk Floeter <reyk@vantronix.net>
*
- * Copyright (C) 1995, 1996, 1997, 1998 by John Ioannidis, Angelos D. Keromytis
- * and Niels Provos.
- * Copyright (c) 2001, Angelos D. Keromytis.
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * Permission to use, copy, and modify this software with or without fee
- * is hereby granted, provided that this entire notice is included in
- * all copies of any software which is or includes a copy or
- * modification of this software.
- * You may use this code under the GNU public license if you so wish. Please
- * contribute changes back to the authors under this freer than GPL license
- * so that we may further the use of strong encryption without limitations to
- * all.
- *
- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
- * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
- * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
- * PURPOSE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifndef _NET_IF_ENC_H_
-#define _NET_IF_ENC_H_
+#ifndef _NET_ENC_H
+#define _NET_ENC_H
-#define ENCMTU (1024+512)
+#define ENCMTU 1536 /* XXX should be bigger, maybe LOMTU */
#define ENC_HDRLEN 12
struct enc_softc {
- struct ifnet sc_if; /* the interface */
+ struct ifnet sc_if; /* virtual interface */
+ u_int sc_unit;
+
+ TAILQ_ENTRY(enc_softc) sc_entry;
};
struct enchdr {
@@ -49,5 +35,6 @@ struct enchdr {
u_int32_t flags;
};
-extern struct enc_softc encif[];
-#endif /* _NET_IF_ENC_H_ */
+struct ifnet *enc_getif(u_int);
+
+#endif /* _NET_ENC_H */