diff options
author | nordmark <none@none> | 2007-10-11 22:57:36 -0700 |
---|---|---|
committer | nordmark <none@none> | 2007-10-11 22:57:36 -0700 |
commit | fc80c0dfb0c877aee828d778ea32b77fcf7b1ef4 (patch) | |
tree | 6dec9e57526902b987236d87151076c1fe6726c1 /usr/src/uts/common/inet/inetddi.c | |
parent | 0ed947430948b9592d83cd6b54fc0869c5b8879c (diff) | |
download | illumos-joyent-fc80c0dfb0c877aee828d778ea32b77fcf7b1ef4.tar.gz |
6595449 IP streams plumbing simpification
6604040 ASSERT fp->timer_mp == 0L panic in sctp_common.c, line: 1876
6606989 panic in ip_rput_forward for multicast router
6606990 assertion failed: th_trace->th_refcnt == 0
6608966 Backport to onnv: 6440004 Get rid of UDP's perimeter mechanism in favor of locks.
Diffstat (limited to 'usr/src/uts/common/inet/inetddi.c')
-rw-r--r-- | usr/src/uts/common/inet/inetddi.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/usr/src/uts/common/inet/inetddi.c b/usr/src/uts/common/inet/inetddi.c index e6a0395ba0..69b1ba8c4f 100644 --- a/usr/src/uts/common/inet/inetddi.c +++ b/usr/src/uts/common/inet/inetddi.c @@ -42,46 +42,47 @@ * The symbols that all modules and drivers must define are: * * INET_NAME The name of the module/driver. - * INET_STRTAB The name of the `streamtab' structure. * * The symbols that all modules must define are: * + * INET_MODSTRTAB The name of the `streamtab' structure for this module. * INET_MODDESC The one-line description for this module. * INET_MODMTFLAGS The mt-streams(9F) flags for the module. * * The symbols that all drivers must define are: * + * INET_DEVSTRTAB The name of the `streamtab' structure for this driver. * INET_DEVDESC The one-line description for this driver. * INET_DEVMTFLAGS The mt-streams(9F) flags for the driver. * INET_DEVMINOR The minor number of the driver (usually 0). * * Drivers that need to masquerade as IP should set INET_DEVMTFLAGS to - * IP_DEVMTFLAGS and then call INET_BECOME_IP() in their _init(9E) routine. + * IP_DEVMTFLAGS and set INET_DEVSTRTAB to ipinfo. */ -#if !defined(INET_STRTAB) -#error inetddi.c: INET_STRTAB is not defined! -#elif !defined(INET_NAME) +#if !defined(INET_NAME) #error inetddi.c: INET_NAME is not defined! #elif !defined(INET_DEVDESC) && !defined(INET_MODDESC) #error inetddi.c: at least one of INET_DEVDESC or INET_MODDESC must be defined! +#elif defined(INET_DEVDESC) && !defined(INET_DEVSTRTAB) +#error inetddi.c: INET_DEVDESC is defined but INET_DEVSTRTAB is not! #elif defined(INET_DEVDESC) && !defined(INET_DEVMTFLAGS) #error inetddi.c: INET_DEVDESC is defined but INET_DEVMTFLAGS is not! #elif defined(INET_DEVDESC) && !defined(INET_DEVMINOR) #error inetddi.c: INET_DEVDESC is defined but INET_DEVMINOR is not! +#elif defined(INET_MODDESC) && !defined(INET_MODSTRTAB) +#error inetddi.c: INET_MODDESC is defined but INET_MODSTRTAB is not! #elif defined(INET_MODDESC) && !defined(INET_MODMTFLAGS) #error inetddi.c: INET_MODDESC is defined but INET_MODMTFLAGS is not! #endif -extern struct streamtab INET_STRTAB, ipinfo; - #ifdef INET_DEVDESC +extern struct streamtab INET_DEVSTRTAB; + /* - * This macro is intended to be called from the _init() routine of drivers - * that actually want to be IP. Yes, this is a disgusting, vile hack. + * Drivers that actually want to be IP would set INET_DEVSTRTAB to ipinfo. */ -#define INET_BECOME_IP() (cb_inet_devops.cb_str = &ipinfo) static dev_info_t *inet_dev_info; @@ -167,7 +168,7 @@ inet_info(dev_info_t *dip, ddi_info_cmd_t cmd, void *arg, void **result) } DDI_DEFINE_STREAM_OPS(inet_devops, nulldev, nulldev, inet_attach, inet_detach, - nulldev, inet_info, INET_DEVMTFLAGS, &INET_STRTAB); + nulldev, inet_info, INET_DEVMTFLAGS, &INET_DEVSTRTAB); static struct modldrv modldrv = { &mod_driverops, @@ -178,9 +179,11 @@ static struct modldrv modldrv = { #endif /* INET_DEVDESC */ #ifdef INET_MODDESC +extern struct streamtab INET_MODSTRTAB; + static struct fmodsw fsw = { INET_NAME, - &INET_STRTAB, + &INET_MODSTRTAB, INET_MODMTFLAGS }; |