summaryrefslogtreecommitdiff
path: root/sys/net/pipex_local.h
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2011-10-15 03:24:12 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2011-10-15 03:24:12 +0000
commit0fc580053976b92a57e7ef7a3d4c3dba5cbeed93 (patch)
tree9d042d6965d8c827f56535353f9042aa2ede9b3a /sys/net/pipex_local.h
parent3915fb613669eb3791b0f720e3d5baa758e7e012 (diff)
Added "provision for rewound PPP frames" that allows receiving
reorder packets to pass to the upper layer without reorder. It will improve performance (throughput or loss rate) for PPTP or L2TP(/IPesc) on networks that latency is unstable such as mobile network. As our test environment (bandwidth: 6Mbps, latency: 50ms for 97% of traffic and 52ms for rest of traffic), throughput has changed from 0.76MB to 2.17MB on file upload by PPTP connected Windows Vista ftp.exe. Developed by UMEZAWA Takeshi at IIJ. ok jmatthew@ tested jmatthew@ and myself.
Diffstat (limited to 'sys/net/pipex_local.h')
-rw-r--r--sys/net/pipex_local.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/net/pipex_local.h b/sys/net/pipex_local.h
index 11be4715ec8..dcbf9c1ef35 100644
--- a/sys/net/pipex_local.h
+++ b/sys/net/pipex_local.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pipex_local.h,v 1.12 2011/07/08 19:34:04 yasuoka Exp $ */
+/* $OpenBSD: pipex_local.h,v 1.13 2011/10/15 03:24:11 yasuoka Exp $ */
/*
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -37,6 +37,8 @@
#define PIPEX_PPPOE 1
#define PIPEX_MPPE 1
+#define PIPEX_REWIND_LIMIT 64
+
#define PIPEX_ENABLED 0x0001
#ifndef LOG_PPPAC
@@ -59,6 +61,9 @@
#define NNBY 8 /* number of bits of a byte */
#endif
+#define PIPEX_MPPE_NOLDKEY 64 /* should be power of two */
+#define PIPEX_MPPE_OLDKEYMASK (PIPEX_MPPE_NOLDKEY - 1)
+
#ifdef PIPEX_MPPE
/* mppe rc4 key */
struct pipex_mppe {
@@ -71,6 +76,7 @@ struct pipex_mppe {
struct rc4_ctx rc4ctx;
u_char master_key[PIPEX_MPPE_KEYLEN]; /* master key of MPPE */
u_char session_key[PIPEX_MPPE_KEYLEN]; /* session key of MPPE */
+ u_char (*old_session_keys)[PIPEX_MPPE_KEYLEN]; /* old session keys */
};
#endif /* PIPEX_MPPE */
@@ -402,7 +408,7 @@ Static struct pipex_session *pipex_l2tp_userland_lookup_session(struct mbuf *,
#endif
#ifdef PIPEX_MPPE
-Static void pipex_mppe_req_init (struct pipex_mppe_req *, struct pipex_mppe *);
+Static void pipex_mppe_init (struct pipex_mppe *, int, int, u_char *, int);
Static void GetNewKeyFromSHA (u_char *, u_char *, int, u_char *);
Static void pipex_mppe_reduce_key (struct pipex_mppe *);
Static void mppe_key_change (struct pipex_mppe *);
@@ -410,8 +416,9 @@ Static void pipex_mppe_input (struct mbuf *, struct pipex_sessi
Static void pipex_mppe_output (struct mbuf *, struct pipex_session *, uint16_t);
Static void pipex_ccp_input (struct mbuf *, struct pipex_session *);
Static int pipex_ccp_output (struct pipex_session *, int, int);
-Static inline int rc4_key(struct pipex_mppe *, int, u_char *);
-Static inline void rc4(struct pipex_mppe *, int, u_char *, u_char *);
+Static inline int pipex_mppe_setkey(struct pipex_mppe *);
+Static inline int pipex_mppe_setoldkey(struct pipex_mppe *, uint16_t);
+Static inline void pipex_mppe_crypt(struct pipex_mppe *, int, u_char *, u_char *);
#endif
Static struct mbuf *adjust_tcp_mss (struct mbuf *, int);