xform_ipcomp.c (185088) | xform_ipcomp.c (190787) |
---|---|
1/* $FreeBSD: head/sys/netipsec/xform_ipcomp.c 185088 2008-11-19 09:39:34Z zec $ */ | 1/* $FreeBSD: head/sys/netipsec/xform_ipcomp.c 190787 2009-04-06 22:29:41Z zec $ */ |
2/* $OpenBSD: ip_ipcomp.c,v 1.1 2001/07/05 12:08:52 jjbg Exp $ */ 3 4/*- 5 * Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org) 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: --- 65 unchanged lines hidden (view full) --- 75SYSCTL_DECL(_net_inet_ipcomp); 76SYSCTL_V_INT(V_NET, vnet_ipsec, _net_inet_ipcomp, OID_AUTO, 77 ipcomp_enable, CTLFLAG_RW, ipcomp_enable, 0, ""); 78SYSCTL_V_STRUCT(V_NET, vnet_ipsec, _net_inet_ipcomp, IPSECCTL_STATS, 79 stats, CTLFLAG_RD, ipcompstat, ipcompstat, ""); 80 81static int ipcomp_input_cb(struct cryptop *crp); 82static int ipcomp_output_cb(struct cryptop *crp); | 2/* $OpenBSD: ip_ipcomp.c,v 1.1 2001/07/05 12:08:52 jjbg Exp $ */ 3 4/*- 5 * Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org) 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: --- 65 unchanged lines hidden (view full) --- 75SYSCTL_DECL(_net_inet_ipcomp); 76SYSCTL_V_INT(V_NET, vnet_ipsec, _net_inet_ipcomp, OID_AUTO, 77 ipcomp_enable, CTLFLAG_RW, ipcomp_enable, 0, ""); 78SYSCTL_V_STRUCT(V_NET, vnet_ipsec, _net_inet_ipcomp, IPSECCTL_STATS, 79 stats, CTLFLAG_RD, ipcompstat, ipcompstat, ""); 80 81static int ipcomp_input_cb(struct cryptop *crp); 82static int ipcomp_output_cb(struct cryptop *crp); |
83static int ipcomp_iattach(const void *); |
|
83 84struct comp_algo * 85ipcomp_algorithm_lookup(int alg) 86{ 87 if (alg >= IPCOMP_ALG_MAX) 88 return NULL; 89 switch (alg) { 90 case SADB_X_CALG_DEFLATE: --- 504 unchanged lines hidden (view full) --- 595 ipcomp_init, ipcomp_zeroize, ipcomp_input, 596 ipcomp_output 597}; 598 599static void 600ipcomp_attach(void) 601{ 602 | 84 85struct comp_algo * 86ipcomp_algorithm_lookup(int alg) 87{ 88 if (alg >= IPCOMP_ALG_MAX) 89 return NULL; 90 switch (alg) { 91 case SADB_X_CALG_DEFLATE: --- 504 unchanged lines hidden (view full) --- 596 ipcomp_init, ipcomp_zeroize, ipcomp_input, 597 ipcomp_output 598}; 599 600static void 601ipcomp_attach(void) 602{ 603 |
603 V_ipcomp_enable = 0; | |
604 xform_register(&ipcomp_xformsw); | 604 xform_register(&ipcomp_xformsw); |
605 ipcomp_iattach(NULL); |
|
605} | 606} |
607 608static int 609ipcomp_iattach(const void *unused __unused) 610{ 611 INIT_VNET_IPSEC(curvnet); 612 613 V_ipcomp_enable = 0; 614 return (0); 615} |
|
606SYSINIT(ipcomp_xform_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, ipcomp_attach, NULL); | 616SYSINIT(ipcomp_xform_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, ipcomp_attach, NULL); |