Deleted Added
full compact
ng_pptpgre.c (68876) ng_pptpgre.c (69922)
1
2/*
3 * ng_pptpgre.c
4 *
5 * Copyright (c) 1996-1999 Whistle Communications, Inc.
6 * All rights reserved.
7 *
8 * Subject to the following obligations and disclaimer of warranty, use and

--- 22 unchanged lines hidden (view full) ---

31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
35 * OF SUCH DAMAGE.
36 *
37 * Author: Archie Cobbs <archie@freebsd.org>
38 *
1
2/*
3 * ng_pptpgre.c
4 *
5 * Copyright (c) 1996-1999 Whistle Communications, Inc.
6 * All rights reserved.
7 *
8 * Subject to the following obligations and disclaimer of warranty, use and

--- 22 unchanged lines hidden (view full) ---

31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
35 * OF SUCH DAMAGE.
36 *
37 * Author: Archie Cobbs <archie@freebsd.org>
38 *
39 * $FreeBSD: head/sys/netgraph/ng_pptpgre.c 68876 2000-11-18 15:17:43Z dwmalone $
39 * $FreeBSD: head/sys/netgraph/ng_pptpgre.c 69922 2000-12-12 18:52:14Z julian $
40 * $Whistle: ng_pptpgre.c,v 1.7 1999/12/08 00:10:06 archie Exp $
41 */
42
43/*
44 * PPTP/GRE netgraph node type.
45 *
46 * This node type does the GRE encapsulation as specified for the PPTP
47 * protocol (RFC 2637, section 4). This includes sequencing and

--- 202 unchanged lines hidden (view full) ---

250 NULL,
251 ng_pptpgre_constructor,
252 ng_pptpgre_rcvmsg,
253 ng_pptpgre_rmnode,
254 ng_pptpgre_newhook,
255 NULL,
256 NULL,
257 ng_pptpgre_rcvdata,
40 * $Whistle: ng_pptpgre.c,v 1.7 1999/12/08 00:10:06 archie Exp $
41 */
42
43/*
44 * PPTP/GRE netgraph node type.
45 *
46 * This node type does the GRE encapsulation as specified for the PPTP
47 * protocol (RFC 2637, section 4). This includes sequencing and

--- 202 unchanged lines hidden (view full) ---

250 NULL,
251 ng_pptpgre_constructor,
252 ng_pptpgre_rcvmsg,
253 ng_pptpgre_rmnode,
254 ng_pptpgre_newhook,
255 NULL,
256 NULL,
257 ng_pptpgre_rcvdata,
258 ng_pptpgre_rcvdata,
259 ng_pptpgre_disconnect,
260 ng_pptpgre_cmdlist
261};
262NETGRAPH_INIT(pptpgre, &ng_pptpgre_typestruct);
263
264#define ERROUT(x) do { error = (x); goto done; } while (0)
265
266/************************************************************************

--- 122 unchanged lines hidden (view full) ---

389 return (error);
390}
391
392/*
393 * Receive incoming data on a hook.
394 */
395static int
396ng_pptpgre_rcvdata(hook_p hook, struct mbuf *m, meta_p meta,
258 ng_pptpgre_disconnect,
259 ng_pptpgre_cmdlist
260};
261NETGRAPH_INIT(pptpgre, &ng_pptpgre_typestruct);
262
263#define ERROUT(x) do { error = (x); goto done; } while (0)
264
265/************************************************************************

--- 122 unchanged lines hidden (view full) ---

388 return (error);
389}
390
391/*
392 * Receive incoming data on a hook.
393 */
394static int
395ng_pptpgre_rcvdata(hook_p hook, struct mbuf *m, meta_p meta,
397 struct mbuf **ret_m, meta_p *ret_meta)
396 struct mbuf **ret_m, meta_p *ret_meta, struct ng_mesg **resp)
398{
399 const node_p node = hook->node;
400 const priv_p priv = node->private;
401
402 /* If not configured, reject */
403 if (!priv->conf.enabled) {
404 NG_FREE_DATA(m, meta);
405 return (ENXIO);

--- 534 unchanged lines hidden ---
397{
398 const node_p node = hook->node;
399 const priv_p priv = node->private;
400
401 /* If not configured, reject */
402 if (!priv->conf.enabled) {
403 NG_FREE_DATA(m, meta);
404 return (ENXIO);

--- 534 unchanged lines hidden ---