Home | History | Annotate | Download | only in ip
      1     0    stevel /*
      2     0    stevel  * CDDL HEADER START
      3     0    stevel  *
      4     0    stevel  * The contents of this file are subject to the terms of the
      5  5240  nordmark  * Common Development and Distribution License (the "License").
      6  5240  nordmark  * You may not use this file except in compliance with the License.
      7     0    stevel  *
      8     0    stevel  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9     0    stevel  * or http://www.opensolaris.org/os/licensing.
     10     0    stevel  * See the License for the specific language governing permissions
     11     0    stevel  * and limitations under the License.
     12     0    stevel  *
     13     0    stevel  * When distributing Covered Code, include this CDDL HEADER in each
     14     0    stevel  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15     0    stevel  * If applicable, add the following below this CDDL HEADER, with the
     16     0    stevel  * fields enclosed by brackets "[]" replaced with your own identifying
     17     0    stevel  * information: Portions Copyright [yyyy] [name of copyright owner]
     18     0    stevel  *
     19     0    stevel  * CDDL HEADER END
     20     0    stevel  */
     21     0    stevel /*
     22  7862   Richard  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
     23     0    stevel  * Use is subject to license terms.
     24     0    stevel  */
     25     0    stevel /* Copyright (c) 1990 Mentat Inc. */
     26     0    stevel 
     27     0    stevel #include <sys/types.h>
     28     0    stevel #include <sys/conf.h>
     29     0    stevel #include <sys/modctl.h>
     30     0    stevel #include <inet/common.h>
     31     0    stevel #include <inet/ip.h>
     32  8348      Eric #include <inet/rawip_impl.h>
     33  8348      Eric #include <sys/strsubr.h>
     34  8348      Eric #include <sys/socketvar.h>
     35     0    stevel 
     36     0    stevel #define	INET_NAME	"icmp"
     37  7862   Richard #define	INET_MODDESC	"ICMP dummy STREAMS module"
     38  7862   Richard #define	INET_DEVDESC	"ICMP STREAMS driver"
     39  5240  nordmark #define	INET_DEVMINOR	0
     40  5240  nordmark #define	INET_DEVSTRTAB	icmpinfov4
     41  5240  nordmark #define	INET_MODSTRTAB	dummymodinfo
     42  8348      Eric #define	INET_SOCKDESC	"Rawip socket module"
     43  8348      Eric #define	INET_SOCK_PROTO_CREATE_FUNC (*rawip_create)
     44  8348      Eric #define	INET_SOCK_PROTO_FB_FUNC (*rawip_fallback)
     45  5240  nordmark #define	INET_DEVMTFLAGS	D_MP
     46  5240  nordmark #define	INET_MODMTFLAGS D_MP
     47     0    stevel 
     48     0    stevel #include "../inetddi.c"
     49     0    stevel 
     50     0    stevel int
     51     0    stevel _init(void)
     52     0    stevel {
     53     0    stevel 	/*
     54  5240  nordmark 	 * device initialization happens when the actual code containing
     55  5240  nordmark 	 * module (/kernel/drv/ip) is loaded, and driven from ip_ddi_init()
     56     0    stevel 	 */
     57  5240  nordmark 	return (mod_install(&modlinkage));
     58     0    stevel }
     59     0    stevel 
     60     0    stevel int
     61     0    stevel _fini(void)
     62     0    stevel {
     63  5240  nordmark 	return (mod_remove(&modlinkage));
     64     0    stevel }
     65     0    stevel 
     66     0    stevel int
     67     0    stevel _info(struct modinfo *modinfop)
     68     0    stevel {
     69     0    stevel 	return (mod_info(&modlinkage, modinfop));
     70     0    stevel }
     71