ng_cisco.c (67506) | ng_cisco.c (68876) |
---|---|
1 2/* 3 * ng_cisco.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: Julian Elischer <julian@freebsd.org> 38 * | 1 2/* 3 * ng_cisco.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: Julian Elischer <julian@freebsd.org> 38 * |
39 * $FreeBSD: head/sys/netgraph/ng_cisco.c 67506 2000-10-24 17:32:45Z julian $ | 39 * $FreeBSD: head/sys/netgraph/ng_cisco.c 68876 2000-11-18 15:17:43Z dwmalone $ |
40 * $Whistle: ng_cisco.c,v 1.25 1999/11/01 09:24:51 julian Exp $ 41 */ 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/errno.h> 46#include <sys/kernel.h> 47#include <sys/socket.h> --- 143 unchanged lines hidden (view full) --- 191 * Node constructor 192 */ 193static int 194cisco_constructor(node_p *nodep) 195{ 196 sc_p sc; 197 int error = 0; 198 | 40 * $Whistle: ng_cisco.c,v 1.25 1999/11/01 09:24:51 julian Exp $ 41 */ 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/errno.h> 46#include <sys/kernel.h> 47#include <sys/socket.h> --- 143 unchanged lines hidden (view full) --- 191 * Node constructor 192 */ 193static int 194cisco_constructor(node_p *nodep) 195{ 196 sc_p sc; 197 int error = 0; 198 |
199 MALLOC(sc, sc_p, sizeof(*sc), M_NETGRAPH, M_NOWAIT); | 199 MALLOC(sc, sc_p, sizeof(*sc), M_NETGRAPH, M_NOWAIT | M_ZERO); |
200 if (sc == NULL) 201 return (ENOMEM); | 200 if (sc == NULL) 201 return (ENOMEM); |
202 bzero(sc, sizeof(struct cisco_priv)); | |
203 204 callout_handle_init(&sc->handle); 205 if ((error = ng_make_node_common(&typestruct, nodep))) { 206 FREE(sc, M_NETGRAPH); 207 return (error); 208 } 209 (*nodep)->private = sc; 210 sc->node = *nodep; --- 393 unchanged lines hidden --- | 202 203 callout_handle_init(&sc->handle); 204 if ((error = ng_make_node_common(&typestruct, nodep))) { 205 FREE(sc, M_NETGRAPH); 206 return (error); 207 } 208 (*nodep)->private = sc; 209 sc->node = *nodep; --- 393 unchanged lines hidden --- |