1 /*
   2  * This file and its contents are supplied under the terms of the
   3  * Common Development and Distribution License ("CDDL"), version 1.0.
   4  * You may only use this file in accordance with the terms of version
   5  * 1.0 of the CDDL.
   6  *
   7  * A full copy of the text of the CDDL should have accompanied this
   8  * source.  A copy of the CDDL is also available via the Internet at
   9  * http://www.illumos.org/license/CDDL.
  10  */
  11 
  12 /*
  13  * Copyright 2012 David Hoeppner.  All rights reserved.
  14  */
  15 
  16 #include <sys/types.h>
  17 #include <sys/conf.h>
  18 #include <sys/modctl.h>
  19 #include <inet/common.h>
  20 #include <inet/ip.h>
  21 #include <sys/strsubr.h>
  22 #include <sys/socketvar.h>
  23 #include <inet/dccp.h>
  24 #include <inet/dccp_impl.h>
  25 
  26 #define INET_NAME       "dccp"
  27 #define INET_MODDESC    "DCCP dummy STREAMS module"
  28 #define INET_DEVDESC    "DCCP STREAMS driver"
  29 #define INET_SOCKDESC   "DCCP socket module"
  30 #define INET_MODSTRTAB  dummymodinfo
  31 #define INET_DEVSTRTAB  dccpinfov4
  32 #define INET_MODMTFLAGS D_MP
  33 #define INET_SOCK_PROTO_CREATE_FUNC     (*dccp_create)
  34 #define INET_SOCK_PROTO_FB_FUNC         (*dccp_fallback)
  35 #define INET_SOCK_FALLBACK_DEV_V4       "/dev/dccp"
  36 #define INET_SOCK_FALLBACK_DEV_V6       "/dev/dccp6"
  37 #define INET_DEVMINOR   0
  38 #define INET_MODMTFLAGS D_MP
  39 #define INET_DEVMTFLAGS (D_MP|_D_DIRECT)
  40 
  41 #include "../inetddi.c"
  42 
  43 int
  44 _init(void)
  45 {
  46         return (mod_install(&modlinkage));
  47 }
  48 
  49 int
  50 _fini(void)
  51 {
  52         return (mod_remove(&modlinkage));
  53 }
  54 
  55 int
  56 _info(struct modinfo *modinfop)
  57 {
  58         return (mod_info(&modlinkage, modinfop));
  59 }