Deleted Added
full compact
if_spppsubr.c (103842) if_spppsubr.c (105228)
1/*
2 * Synchronous PPP/Cisco link level subroutines.
3 * Keepalive protocol implemented in both Cisco and PPP modes.
4 *
5 * Copyright (C) 1994-1996 Cronyx Engineering Ltd.
6 * Author: Serge Vakulenko, <vak@cronyx.ru>
7 *
8 * Heavily revamped to conform to RFC 1661.
9 * Copyright (C) 1997, 2001 Joerg Wunsch.
10 *
11 * This software is distributed with NO WARRANTIES, not even the implied
12 * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 *
14 * Authors grant any other persons or organisations permission to use
15 * or modify this software as long as this message is kept with the software,
16 * all derivative works or modified versions.
17 *
18 * From: Version 2.4, Thu Apr 30 17:17:21 MSD 1997
19 *
1/*
2 * Synchronous PPP/Cisco link level subroutines.
3 * Keepalive protocol implemented in both Cisco and PPP modes.
4 *
5 * Copyright (C) 1994-1996 Cronyx Engineering Ltd.
6 * Author: Serge Vakulenko, <vak@cronyx.ru>
7 *
8 * Heavily revamped to conform to RFC 1661.
9 * Copyright (C) 1997, 2001 Joerg Wunsch.
10 *
11 * This software is distributed with NO WARRANTIES, not even the implied
12 * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 *
14 * Authors grant any other persons or organisations permission to use
15 * or modify this software as long as this message is kept with the software,
16 * all derivative works or modified versions.
17 *
18 * From: Version 2.4, Thu Apr 30 17:17:21 MSD 1997
19 *
20 * $FreeBSD: head/sys/net/if_spppsubr.c 103842 2002-09-23 06:25:08Z alfred $
20 * $FreeBSD: head/sys/net/if_spppsubr.c 105228 2002-10-16 10:45:53Z phk $
21 */
22
23#include <sys/param.h>
24
25#if defined(__FreeBSD__) && __FreeBSD__ >= 3
26#include "opt_inet.h"
27#include "opt_inet6.h"
28#include "opt_ipx.h"

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

2070
2071 splx(s);
2072}
2073
2074/*
2075 * Change the state of a control protocol in the state automaton.
2076 * Takes care of starting/stopping the restart timer.
2077 */
21 */
22
23#include <sys/param.h>
24
25#if defined(__FreeBSD__) && __FreeBSD__ >= 3
26#include "opt_inet.h"
27#include "opt_inet6.h"
28#include "opt_ipx.h"

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

2070
2071 splx(s);
2072}
2073
2074/*
2075 * Change the state of a control protocol in the state automaton.
2076 * Takes care of starting/stopping the restart timer.
2077 */
2078void
2078static void
2079sppp_cp_change_state(const struct cp *cp, struct sppp *sp, int newstate)
2080{
2081 sp->state[cp->protoidx] = newstate;
2082
2083 UNTIMEOUT(cp->TO, (void *)sp, sp->ch[cp->protoidx]);
2084 switch (newstate) {
2085 case STATE_INITIAL:
2086 case STATE_STARTING:

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

3871 * track of the peer demanding us to authenticate, and only proceed to
3872 * phase network once we've seen a positive acknowledge for the
3873 * authentication.
3874 */
3875
3876/*
3877 * Handle incoming CHAP packets.
3878 */
2079sppp_cp_change_state(const struct cp *cp, struct sppp *sp, int newstate)
2080{
2081 sp->state[cp->protoidx] = newstate;
2082
2083 UNTIMEOUT(cp->TO, (void *)sp, sp->ch[cp->protoidx]);
2084 switch (newstate) {
2085 case STATE_INITIAL:
2086 case STATE_STARTING:

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

3871 * track of the peer demanding us to authenticate, and only proceed to
3872 * phase network once we've seen a positive acknowledge for the
3873 * authentication.
3874 */
3875
3876/*
3877 * Handle incoming CHAP packets.
3878 */
3879void
3879static void
3880sppp_chap_input(struct sppp *sp, struct mbuf *m)
3881{
3882 STDDCL;
3883 struct lcp_header *h;
3884 int len, x;
3885 u_char *value, *name, digest[AUTHKEYLEN], dsize;
3886 int value_len, name_len;
3887 MD5_CTX ctx;

--- 1487 unchanged lines hidden ---
3880sppp_chap_input(struct sppp *sp, struct mbuf *m)
3881{
3882 STDDCL;
3883 struct lcp_header *h;
3884 int len, x;
3885 u_char *value, *name, digest[AUTHKEYLEN], dsize;
3886 int value_len, name_len;
3887 MD5_CTX ctx;

--- 1487 unchanged lines hidden ---