if_spppsubr.c (74774) | if_spppsubr.c (75321) |
---|---|
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, 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, 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 74774 2001-03-25 09:53:07Z joerg $ | 20 * $FreeBSD: head/sys/net/if_spppsubr.c 75321 2001-04-08 20:29:09Z joerg $ |
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" --- 1825 unchanged lines hidden (view full) --- 1854 STDDCL; 1855 1856 sp->pp_alivecnt = 0; 1857 sp->lcp.opts = (1 << LCP_OPT_MAGIC); 1858 sp->lcp.magic = 0; 1859 sp->lcp.protos = 0; 1860 sp->lcp.mru = sp->lcp.their_mru = PP_MTU; 1861 /* | 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" --- 1825 unchanged lines hidden (view full) --- 1854 STDDCL; 1855 1856 sp->pp_alivecnt = 0; 1857 sp->lcp.opts = (1 << LCP_OPT_MAGIC); 1858 sp->lcp.magic = 0; 1859 sp->lcp.protos = 0; 1860 sp->lcp.mru = sp->lcp.their_mru = PP_MTU; 1861 /* |
1862 * If we are authenticator, negotiate LCP_AUTH 1863 */ 1864 if (sp->hisauth.proto != 0) 1865 sp->lcp.opts |= (1 << LCP_OPT_AUTH_PROTO); 1866 else 1867 sp->lcp.opts &= ~(1 << LCP_OPT_AUTH_PROTO); 1868 sp->pp_flags &= ~PP_NEEDAUTH; 1869 /* |
|
1862 * If this interface is passive or dial-on-demand, and we are 1863 * still in Initial state, it means we've got an incoming 1864 * call. Activate the interface. 1865 */ 1866 if ((ifp->if_flags & (IFF_AUTO | IFF_PASSIVE)) != 0) { 1867 if (debug) 1868 log(LOG_DEBUG, 1869 SPP_FMT "Up event", SPP_ARGS(ifp)); --- 39 unchanged lines hidden (view full) --- 1909 lcp.Close(sp); 1910 ifp->if_flags &= ~IFF_RUNNING; 1911 } 1912} 1913 1914static void 1915sppp_lcp_open(struct sppp *sp) 1916{ | 1870 * If this interface is passive or dial-on-demand, and we are 1871 * still in Initial state, it means we've got an incoming 1872 * call. Activate the interface. 1873 */ 1874 if ((ifp->if_flags & (IFF_AUTO | IFF_PASSIVE)) != 0) { 1875 if (debug) 1876 log(LOG_DEBUG, 1877 SPP_FMT "Up event", SPP_ARGS(ifp)); --- 39 unchanged lines hidden (view full) --- 1917 lcp.Close(sp); 1918 ifp->if_flags &= ~IFF_RUNNING; 1919 } 1920} 1921 1922static void 1923sppp_lcp_open(struct sppp *sp) 1924{ |
1917 /* 1918 * If we are authenticator, negotiate LCP_AUTH 1919 */ 1920 if (sp->hisauth.proto != 0) 1921 sp->lcp.opts |= (1 << LCP_OPT_AUTH_PROTO); 1922 else 1923 sp->lcp.opts &= ~(1 << LCP_OPT_AUTH_PROTO); 1924 sp->pp_flags &= ~PP_NEEDAUTH; | |
1925 sppp_open_event(&lcp, sp); 1926} 1927 1928static void 1929sppp_lcp_close(struct sppp *sp) 1930{ 1931 sppp_close_event(&lcp, sp); 1932} --- 2332 unchanged lines hidden --- | 1925 sppp_open_event(&lcp, sp); 1926} 1927 1928static void 1929sppp_lcp_close(struct sppp *sp) 1930{ 1931 sppp_close_event(&lcp, sp); 1932} --- 2332 unchanged lines hidden --- |