ng_async.c (67506) | ng_async.c (68876) |
---|---|
1 2/* 3 * ng_async.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_async.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_async.c 67506 2000-10-24 17:32:45Z julian $ | 39 * $FreeBSD: head/sys/netgraph/ng_async.c 68876 2000-11-18 15:17:43Z dwmalone $ |
40 * $Whistle: ng_async.c,v 1.17 1999/11/01 09:24:51 julian Exp $ 41 */ 42 43/* 44 * This node type implements a PPP style sync <-> async converter. 45 * See RFC 1661 for details of how asynchronous encoding works. 46 */ 47 --- 129 unchanged lines hidden (view full) --- 177static int 178nga_constructor(node_p *nodep) 179{ 180 sc_p sc; 181 int error; 182 183 if ((error = ng_make_node_common(&typestruct, nodep))) 184 return (error); | 40 * $Whistle: ng_async.c,v 1.17 1999/11/01 09:24:51 julian Exp $ 41 */ 42 43/* 44 * This node type implements a PPP style sync <-> async converter. 45 * See RFC 1661 for details of how asynchronous encoding works. 46 */ 47 --- 129 unchanged lines hidden (view full) --- 177static int 178nga_constructor(node_p *nodep) 179{ 180 sc_p sc; 181 int error; 182 183 if ((error = ng_make_node_common(&typestruct, nodep))) 184 return (error); |
185 MALLOC(sc, sc_p, sizeof(*sc), M_NETGRAPH, M_NOWAIT); | 185 MALLOC(sc, sc_p, sizeof(*sc), M_NETGRAPH, M_NOWAIT | M_ZERO); |
186 if (sc == NULL) 187 return (ENOMEM); | 186 if (sc == NULL) 187 return (ENOMEM); |
188 bzero(sc, sizeof(*sc)); | |
189 sc->amode = MODE_HUNT; 190 sc->cfg.accm = ~0; 191 sc->cfg.amru = NG_ASYNC_DEFAULT_MRU; 192 sc->cfg.smru = NG_ASYNC_DEFAULT_MRU; 193 MALLOC(sc->abuf, u_char *, 194 ASYNC_BUF_SIZE(sc->cfg.smru), M_NETGRAPH, M_NOWAIT); 195 if (sc->abuf == NULL) 196 goto fail; --- 419 unchanged lines hidden --- | 188 sc->amode = MODE_HUNT; 189 sc->cfg.accm = ~0; 190 sc->cfg.amru = NG_ASYNC_DEFAULT_MRU; 191 sc->cfg.smru = NG_ASYNC_DEFAULT_MRU; 192 MALLOC(sc->abuf, u_char *, 193 ASYNC_BUF_SIZE(sc->cfg.smru), M_NETGRAPH, M_NOWAIT); 194 if (sc->abuf == NULL) 195 goto fail; --- 419 unchanged lines hidden --- |