ng_device.c (125028) | ng_device.c (126076) |
---|---|
1/* 2 * Copyright (c) 2002 Mark Santcroos <marks@ripe.net> 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 14 unchanged lines hidden (view full) --- 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * 26 * Netgraph "device" node 27 * 28 * This node presents a /dev/ngd%d device that interfaces to an other 29 * netgraph node. 30 * | 1/* 2 * Copyright (c) 2002 Mark Santcroos <marks@ripe.net> 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 14 unchanged lines hidden (view full) --- 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * 26 * Netgraph "device" node 27 * 28 * This node presents a /dev/ngd%d device that interfaces to an other 29 * netgraph node. 30 * |
31 * $FreeBSD: head/sys/netgraph/ng_device.c 125028 2004-01-26 14:05:31Z harti $ | 31 * $FreeBSD: head/sys/netgraph/ng_device.c 126076 2004-02-21 19:42:58Z phk $ |
32 * 33 */ 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/kernel.h> 38#include <sys/mbuf.h> 39#include <sys/uio.h> --- 67 unchanged lines hidden (view full) --- 107 108static d_close_t ngdclose; 109static d_open_t ngdopen; 110static d_read_t ngdread; 111static d_write_t ngdwrite; 112static d_ioctl_t ngdioctl; 113static d_poll_t ngdpoll; 114 | 32 * 33 */ 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/kernel.h> 38#include <sys/mbuf.h> 39#include <sys/uio.h> --- 67 unchanged lines hidden (view full) --- 107 108static d_close_t ngdclose; 109static d_open_t ngdopen; 110static d_read_t ngdread; 111static d_write_t ngdwrite; 112static d_ioctl_t ngdioctl; 113static d_poll_t ngdpoll; 114 |
115#define NGD_CDEV_MAJOR 20 | |
116static struct cdevsw ngd_cdevsw = { 117 .d_open = ngdopen, 118 .d_close = ngdclose, 119 .d_read = ngdread, 120 .d_write = ngdwrite, 121 .d_ioctl = ngdioctl, 122 .d_poll = ngdpoll, 123 .d_name = "ngd", | 115static struct cdevsw ngd_cdevsw = { 116 .d_open = ngdopen, 117 .d_close = ngdclose, 118 .d_read = ngdread, 119 .d_write = ngdwrite, 120 .d_ioctl = ngdioctl, 121 .d_poll = ngdpoll, 122 .d_name = "ngd", |
124 .d_maj = NGD_CDEV_MAJOR, | |
125}; 126 127/* 128 * this holds all the stuff that should be done at load time 129 */ 130static int 131ng_device_mod_event(module_t mod, int event, void *data) 132{ --- 497 unchanged lines hidden --- | 123}; 124 125/* 126 * this holds all the stuff that should be done at load time 127 */ 128static int 129ng_device_mod_event(module_t mod, int event, void *data) 130{ --- 497 unchanged lines hidden --- |