summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_pptpgre.h
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2008-03-24 22:55:22 +0000
committermav <mav@FreeBSD.org>2008-03-24 22:55:22 +0000
commit9af7fc155dda5e200a9101f2be7e7a4acb661205 (patch)
treeec109e9b530627a31a22b6ea75d8d3a97df804f5 /sys/netgraph/ng_pptpgre.h
parent3e99f5d3641a22b3b971e9bfd001cd16ada60272 (diff)
downloadFreeBSD-src-9af7fc155dda5e200a9101f2be7e7a4acb661205.zip
FreeBSD-src-9af7fc155dda5e200a9101f2be7e7a4acb661205.tar.gz
Rewrite node to support multiple hooks, alike to ng_l2tp, to use one pair
of pptpgre and ksocket nodes for all calls between two peers. This patch modifies node's API by adding new "session_%04x" hook names support, while keeping backward compatibility. Together with appropriate user-level support (by latest mpd5) it gives huge performance benefits for case of multiple active calls between two peers because of avoiding data duplication and extra socket processing. On my benchmarks I have got more then 10 times speedup for the 200 simultaneous PPTP calls between two peers. In conclusion, it allows now to build effective "clients <=> PAC <=> PNS" setups.
Diffstat (limited to 'sys/netgraph/ng_pptpgre.h')
-rw-r--r--sys/netgraph/ng_pptpgre.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netgraph/ng_pptpgre.h b/sys/netgraph/ng_pptpgre.h
index 275f9e2..ecba3ce 100644
--- a/sys/netgraph/ng_pptpgre.h
+++ b/sys/netgraph/ng_pptpgre.h
@@ -52,6 +52,10 @@
#define NG_PPTPGRE_HOOK_UPPER "upper" /* to upper layers */
#define NG_PPTPGRE_HOOK_LOWER "lower" /* to lower layers */
+/* Session hooks: prefix plus hex session ID, e.g., "session_3e14" */
+#define NG_PPTPGRE_HOOK_SESSION_P "session_"
+#define NG_PPTPGRE_HOOK_SESSION_F "session_%04x"
+
/* Configuration for a session */
struct ng_pptpgre_conf {
u_char enabled; /* enables traffic flow */
OpenPOWER on IntegriCloud