1*9a575d93Spgoyette /* $NetBSD: tun.c,v 1.1 2016/09/10 03:26:10 pgoyette Exp $ */
2*9a575d93Spgoyette
3*9a575d93Spgoyette /*-
4*9a575d93Spgoyette * Copyright (c) 2016 The NetBSD Foundation, Inc.
5*9a575d93Spgoyette * All rights reserved.
6*9a575d93Spgoyette *
7*9a575d93Spgoyette * This code is derived from software contributed to The NetBSD Foundation
8*9a575d93Spgoyette * by Paul Goyette
9*9a575d93Spgoyette *
10*9a575d93Spgoyette * Redistribution and use in source and binary forms, with or without
11*9a575d93Spgoyette * modification, are permitted provided that the following conditions
12*9a575d93Spgoyette * are met:
13*9a575d93Spgoyette * 1. Redistributions of source code must retain the above copyright
14*9a575d93Spgoyette * notice, this list of conditions and the following disclaimer.
15*9a575d93Spgoyette * 2. Redistributions in binary form must reproduce the above copyright
16*9a575d93Spgoyette * notice, this list of conditions and the following disclaimer in the
17*9a575d93Spgoyette * documentation and/or other materials provided with the distribution.
18*9a575d93Spgoyette *
19*9a575d93Spgoyette * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20*9a575d93Spgoyette * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21*9a575d93Spgoyette * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22*9a575d93Spgoyette * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23*9a575d93Spgoyette * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24*9a575d93Spgoyette * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25*9a575d93Spgoyette * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26*9a575d93Spgoyette * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27*9a575d93Spgoyette * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28*9a575d93Spgoyette * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29*9a575d93Spgoyette * POSSIBILITY OF SUCH DAMAGE.
30*9a575d93Spgoyette */
31*9a575d93Spgoyette
32*9a575d93Spgoyette #include <sys/cdefs.h>
33*9a575d93Spgoyette __KERNEL_RCSID(0, "$NetBSD: tun.c,v 1.1 2016/09/10 03:26:10 pgoyette Exp $");
34*9a575d93Spgoyette
35*9a575d93Spgoyette #include <sys/errno.h>
36*9a575d93Spgoyette #include <sys/module.h>
37*9a575d93Spgoyette
38*9a575d93Spgoyette MODULE(MODULE_CLASS_DRIVER, tun, "if_tun");
39*9a575d93Spgoyette
40*9a575d93Spgoyette static int
tun_modcmd(modcmd_t cmd,void * arg)41*9a575d93Spgoyette tun_modcmd(modcmd_t cmd, void *arg)
42*9a575d93Spgoyette {
43*9a575d93Spgoyette
44*9a575d93Spgoyette switch (cmd) {
45*9a575d93Spgoyette case MODULE_CMD_INIT:
46*9a575d93Spgoyette case MODULE_CMD_FINI:
47*9a575d93Spgoyette return 0;
48*9a575d93Spgoyette default:
49*9a575d93Spgoyette return ENOTTY;
50*9a575d93Spgoyette }
51*9a575d93Spgoyette }
52