Remove support for Solaris pre-8
[openafs.git] / src / rx / SOLARIS / rx_knet.c
index c46f09b..0e8dcd2 100644 (file)
 #include <afsconfig.h>
 #include "afs/param.h"
 
-RCSID
-    ("$Header$");
 
 #ifdef AFS_SUN5_ENV
 #include "rx/rx_kcommon.h"
 
 
-#ifdef AFS_SUN56_ENV
-
 #include "inet/common.h"
 #include "sys/tiuser.h"
 #include "sys/t_kuser.h"
@@ -26,13 +22,11 @@ RCSID
 #include "sys/stream.h"
 #include "sys/tihdr.h"
 #include "sys/fcntl.h"
-#ifdef AFS_SUN58_ENV
 #include "netinet/ip6.h"
 #define ipif_local_addr ipif_lcl_addr
 #ifndef V4_PART_OF_V6
 #define V4_PART_OF_V6(v6)       v6.s6_addr32[3]
 #endif
-#endif
 #include "inet/ip.h"
 #include "inet/ip_if.h"
 #include "netinet/udp.h"
@@ -50,10 +44,17 @@ RCSID
 /*
  * Function pointers for kernel socket routines
  */
+#ifdef SOLOOKUP_TAKES_SOCKPARAMS
+struct sonode *(*sockfs_socreate)
+  (struct sockparams *, int, int, int, int, int *) = NULL;
+int (*sockfs_solookup)
+  (int, int, int, struct sockparams **) = NULL;
+#else
 struct sonode *(*sockfs_socreate)
   (vnode_t *, int, int, int, int, struct sonode *, int *) = NULL;
 struct vnode *(*sockfs_solookup)
   (int, int, int, char *, int *) = NULL;
+#endif /* SOLOOKUP_TAKES_SOCKPARAMS */
 int (*sockfs_sobind)
   (struct sonode *, struct sockaddr *, int, int, int) = NULL;
 int (*sockfs_sorecvmsg)
@@ -69,6 +70,10 @@ void (*sockfs_sockfree)
   (struct sonode *);
 #endif
 
+#ifndef UDP_MOD_NAME
+#define UDP_MOD_NAME "udp"
+#endif
+
 static afs_uint32 myNetAddrs[ADDRSPERSITE];
 static int myNetMTUs[ADDRSPERSITE];
 static int numMyNetAddrs = 0;
@@ -114,7 +119,7 @@ rxi_GetIFInfo()
            maxmtu = rxi_AdjustMaxMTU(rxmtu, maxmtu);
            addrs[i] = ifinaddr;
 
-           if (ifinaddr != 0x7f000001 && maxmtu > rx_maxReceiveSize) {
+           if (!rx_IsLoopbackAddr(ifinaddr) && maxmtu > rx_maxReceiveSize) {
                rx_maxReceiveSize = MIN(RX_MAX_PACKET_SIZE, maxmtu);
                rx_maxReceiveSize =
                    MIN(rx_maxReceiveSize, rx_maxReceiveSizeUser);
@@ -143,11 +148,9 @@ rxi_GetIFInfo()
 
 #else
     for (ill = ill_g_head; ill; ill = ill->ill_next) {
-#ifdef AFS_SUN58_ENV
        /* Make sure this is an IPv4 ILL */
        if (ill->ill_isv6)
            continue;
-#endif
 
        /* Iterate over all the addresses on this ILL */
        for (ipif = ill->ill_ipif; ipif; ipif = ipif->ipif_next) {
@@ -175,7 +178,7 @@ rxi_GetIFInfo()
            addrs[i] = ifinaddr;
            i++;
 
-           if (ifinaddr != 0x7f000001 && maxmtu > rx_maxReceiveSize) {
+           if (!rx_IsLoopbackAddr(ifinaddr) && maxmtu > rx_maxReceiveSize) {
                rx_maxReceiveSize = MIN(RX_MAX_PACKET_SIZE, maxmtu);
                rx_maxReceiveSize =
                    MIN(rx_maxReceiveSize, rx_maxReceiveSizeUser);
@@ -268,11 +271,9 @@ rxi_FindIfMTU(afs_uint32 addr)
 }
 #else
     for (ill = ill_g_head; ill; ill = ill->ill_next) {
-#ifdef AFS_SUN58_ENV
        /* Make sure this is an IPv4 ILL */
        if (ill->ill_isv6)
            continue;
-#endif
 
        /* Iterate over all the addresses on this ILL */
        for (ipif = ill->ill_ipif; ipif; ipif = ipif->ipif_next) {
@@ -323,12 +324,19 @@ rxk_NewSocketHost(afs_uint32 ahost, short aport)
     struct sockaddr_in addr;
     int error;
     int len;
+#ifdef SOLOOKUP_TAKES_SOCKPARAMS
+    struct sockparams *sp;
+#endif
 
     AFS_STATCNT(osi_NewSocket);
 
     if (sockfs_solookup == NULL) {
        sockfs_solookup =
+#ifdef SOLOOKUP_TAKES_SOCKPARAMS
+           (int (*)())modlookup("sockfs", "solookup");
+#else
            (struct vnode * (*)())modlookup("sockfs", "solookup");
+#endif
        if (sockfs_solookup == NULL) {
            return NULL;
        }
@@ -377,6 +385,14 @@ rxk_NewSocketHost(afs_uint32 ahost, short aport)
     }
 #endif
 
+#ifdef SOLOOKUP_TAKES_SOCKPARAMS
+    error = sockfs_solookup(AF_INET, SOCK_DGRAM, 0, &sp);
+    if (error != 0) {
+       return NULL;
+    }
+
+    so = sockfs_socreate(sp, AF_INET, SOCK_DGRAM, 0, SOV_STREAM, &error);
+#else
     accessvp = sockfs_solookup(AF_INET, SOCK_DGRAM, 0, "/dev/udp", &error);
     if (accessvp == NULL) {
        return NULL;
@@ -384,6 +400,8 @@ rxk_NewSocketHost(afs_uint32 ahost, short aport)
 
     so = sockfs_socreate(accessvp, AF_INET, SOCK_DGRAM, 0, SOV_STREAM, NULL,
                         &error);
+#endif /* SOLOOKUP_TAKES_SOCKPARAMS */
+
     if (so == NULL) {
        return NULL;
     }
@@ -419,7 +437,7 @@ rxk_NewSocket(short aport)
 }
 
 int
-osi_FreeSocket(register osi_socket *asocket)
+osi_FreeSocket(osi_socket asocket)
 {
     extern int rxk_ListenerPid;
     struct sonode *so = (struct sonode *)asocket;
@@ -444,7 +462,11 @@ osi_FreeSocket(register osi_socket *asocket)
 
     /* Was sockfs_sounbind(so, 0); sockfs_sockfree(so); That's wrong */
     vp = SOTOV(so);
+ #ifdef AFS_SUN511_ENV
+    VOP_CLOSE(vp, FREAD|FWRITE, 1, (offset_t)0, CRED(), NULL);
+ #else
     VOP_CLOSE(vp, FREAD|FWRITE, 1, (offset_t)0, CRED());
+ #endif
     VN_RELE(vp);
 
     return 0;
@@ -561,6 +583,8 @@ osi_NetReceive(osi_socket so, struct sockaddr_in *addr, struct iovec *dvec,
 /* set afs:afs_if_poll_interval = integer (value is in seconds)         */
 static int afs_if_poll_interval = 30;
 
+static timeout_id_t afs_if_poller_timeout = 0;
+
 /* Global array which holds the interface info for consumers            */
 struct afs_ifinfo afsifinfo[ADDRSPERSITE];
 
@@ -575,8 +599,8 @@ void
 osi_NetIfPoller()
 {
     cred_t *cr;
-    ldi_ident_t li;
-    ldi_handle_t lh;
+    ldi_ident_t li = NULL;
+    ldi_handle_t lh = NULL;
     struct lifnum lifn;
     struct lifconf lifc;
     struct lifreq lifr;
@@ -584,7 +608,7 @@ osi_NetIfPoller()
     struct sockaddr_in *sin4_local;
     struct sockaddr_in *sin4_dst;
     major_t udpmajor;
-    caddr_t lifcbuf;
+    caddr_t lifcbuf = NULL;
     int i, count, error, rv;
     int ifcount;
     int metric;
@@ -599,15 +623,18 @@ osi_NetIfPoller()
     udpmajor = ddi_name_to_major(UDP_MOD_NAME);
 
     error = ldi_ident_from_major(udpmajor, &li);
-    if (error)
-        cmn_err(CE_PANIC, "osi_NetIfPoller: ldi_ident_from_major failed: %d",
+    if (error) {
+        cmn_err(CE_WARN, "osi_NetIfPoller: ldi_ident_from_major failed: %d",
             error);
+        goto cleanup;
+    }
 
     error = ldi_open_by_name(UDP_DEV_NAME, FREAD, cr, &lh, li);
-    if (error)
-        cmn_err(CE_PANIC,
+    if (error) {
+        cmn_err(CE_WARN,
             "osi_NetIfPoller: ldi_open_by_name failed: %d", error);
-
+        goto cleanup;
+    }
 
     /* First, how many interfaces do we have? */
     (void) bzero((void *)&lifn, sizeof(struct lifnum));
@@ -615,10 +642,11 @@ osi_NetIfPoller()
 
     error = ldi_ioctl(lh, SIOCGLIFNUM, (intptr_t)&lifn,
         FKIOCTL, cr, &rv);
-    if (error)
-     cmn_err(CE_PANIC,
-         "osi_NetIfPoller: ldi_ioctl: SIOCGLIFNUM failed: %d", error);
-
+    if (error) {
+        cmn_err(CE_WARN,
+                "osi_NetIfPoller: ldi_ioctl: SIOCGLIFNUM failed: %d", error);
+        goto cleanup;
+    }
     ifcount = lifn.lifn_count;
 
     /* Set up some stuff for storing the results of SIOCGLIFCONF */
@@ -634,10 +662,11 @@ osi_NetIfPoller()
     /* Get info on each of our available interfaces. */
     error = ldi_ioctl(lh, SIOCGLIFCONF, (intptr_t)&lifc,
         FKIOCTL, cr, &rv);
-    if (error)
-        cmn_err(CE_PANIC,
-            "osi_NetIfPoller: ldi_ioctl: SIOCGLIFCONF failed: %d", error);
-
+    if (error) {
+        cmn_err(CE_WARN,
+                "osi_NetIfPoller: ldi_ioctl: SIOCGLIFCONF failed: %d", error);
+        goto cleanup;
+    }
     lifrp = lifc.lifc_req;
 
     count = 0;
@@ -657,10 +686,12 @@ osi_NetIfPoller()
         /* Get this interface's Flags */
         error = ldi_ioctl(lh, SIOCGLIFFLAGS, (intptr_t)&lifr,
             FKIOCTL, cr, &rv);
-        if (error)
-            cmn_err(CE_PANIC,
-                "osi_NetIfPoller: ldi_ioctl: SIOCGLIFFLAGS failed: %d",
+        if (error) {
+            cmn_err(CE_WARN,
+                    "osi_NetIfPoller: ldi_ioctl: SIOCGLIFFLAGS failed: %d",
                     error);
+            goto cleanup;
+        }
 
         /* Ignore plumbed but down interfaces. */
         if ((lifr.lifr_flags & IFF_UP) == 0)
@@ -711,375 +742,56 @@ osi_NetIfPoller()
 
     } /* Bottom of loop: for each interface ... */
 
-    kmem_free(lifcbuf, ifcount * sizeof(struct lifreq));
-
+  cleanup:
     /* End of thread. Time to clean up */
-    (void) ldi_close(lh, FREAD, cr);
-    (void) ldi_ident_release(li);
-
-    /* Schedule this to run again after afs_if_poll_interval seconds */
-    (void) timeout((void(*) (void *)) osi_StartNetIfPoller, NULL,
-        drv_usectohz((clock_t)afs_if_poll_interval * MICROSEC));
-
-}
-#endif /* AFS_SUN510_ENV */
-
-void
-shutdown_rxkernel(void)
-{
-}
-
-void
-osi_StopListener(void)
-{
-    osi_FreeSocket(rx_socket);
-}
-
-#else /* AFS_SUN56_ENV */
-
-#include "inet/common.h"
-#include "sys/tiuser.h"
-#include "sys/t_kuser.h"
-#include "sys/ioctl.h"
-#include "sys/stropts.h"
-#include "sys/stream.h"
-#include "sys/strsubr.h"
-#include "sys/vnode.h"
-#include "sys/stropts.h"
-#include "sys/tihdr.h"
-#include "sys/timod.h"
-#include "sys/fcntl.h"
-#include "sys/debug.h"
-#include "inet/common.h"
-#include "inet/mi.h"
-#include "netinet/udp.h"
+    if (lifcbuf)
+        kmem_free(lifcbuf, ifcount * sizeof(struct lifreq));
+    if (lh)
+        (void) ldi_close(lh, FREAD, cr);
+    if (li)
+        (void) ldi_ident_release(li);
 
-extern dev_t afs_udp_rdev;
-
-
-int
-rxi_GetIFInfo()
-{
-    return 0;
-}
-
-
-/* rxi_NewSocket, rxi_FreeSocket and osi_NetSend are from the now defunct
- * afs_osinet.c. 
- */
-
-dev_t afs_udp_rdev = (dev_t) 0;
-
-/* Allocate a new socket at specified port in network byte order. */
-osi_socket *
-rxk_NewSocketHost(afs_uint32 ahost, short aport)
-{
-    TIUSER *udp_tiptr;
-    struct t_bind *reqp, *rspp;
-    afs_int32 code;
-    struct sockaddr_in *myaddrp;
-    struct stdata *stp;
-    struct queue *q;
-
-    AFS_STATCNT(osi_NewSocket);
-    afs_udp_rdev = makedevice(11 /*CLONE*/, ddi_name_to_major("udp"));
-    code = t_kopen(NULL, afs_udp_rdev, FREAD | FWRITE, &udp_tiptr, CRED());
-    if (code) {
-       return (osi_socket *)0;
-    }
-
-    code = t_kalloc(udp_tiptr, T_BIND, T_ADDR, (char **)&reqp);
-    if (code) {
-       t_kclose(udp_tiptr, 0);
-    }
-    code = t_kalloc(udp_tiptr, T_BIND, T_ADDR, (char **)&rspp);
-    if (code) {
-       t_kfree(udp_tiptr, (char *)reqp, T_BIND);
-       t_kclose(udp_tiptr, 0);
-       return (osi_socket *)0;
+    if (afs_shuttingdown) {
+       /* do not schedule to run again if we're shutting down */
+       return;
     }
 
-    reqp->addr.len = sizeof(struct sockaddr_in);
-    myaddrp = (struct sockaddr_in *)reqp->addr.buf;
-    myaddrp->sin_family = AF_INET;
-    myaddrp->sin_port = aport;
-    myaddrp->sin_addr.s_addr = ahost;  /* byteswap? */
-
-    code = t_kbind(udp_tiptr, reqp, rspp);
-    if (code) {
-       t_kfree(udp_tiptr, (char *)reqp, T_BIND);
-       t_kfree(udp_tiptr, (char *)rspp, T_BIND);
-       t_kclose(udp_tiptr, 0);
-       return (osi_socket *)0;
-    }
-    if (memcmp(reqp->addr.buf, rspp->addr.buf, rspp->addr.len)) {
-       t_kfree(udp_tiptr, (char *)reqp, T_BIND);
-       t_kfree(udp_tiptr, (char *)rspp, T_BIND);
-       t_kclose(udp_tiptr, 0);
-       return (osi_socket *)0;
-    }
-    t_kfree(udp_tiptr, (char *)reqp, T_BIND);
-    t_kfree(udp_tiptr, (char *)rspp, T_BIND);
-
-    /*
-     * Set the send and receive buffer sizes.
-     */
-    stp = udp_tiptr->fp->f_vnode->v_stream;
-    q = stp->sd_wrq;
-    q->q_hiwat = rx_UdpBufSize;
-    q->q_next->q_hiwat = rx_UdpBufSize;
-    RD(q)->q_hiwat = rx_UdpBufSize;
-
-    return (osi_socket *)udp_tiptr;
-}
-
-osi_socket *
-rxk_NewSocket(short aport)
-{
-    return rxk_NewSocketHost(htonl(INADDR_ANY), aport);
-}
-
-int
-osi_FreeSocket(register osi_socket *asocket)
-{
-    extern int rxk_ListenerPid;
-    TIUSER *udp_tiptr = (TIUSER *) asocket;
-    AFS_STATCNT(osi_FreeSocket);
-
-    if (rxk_ListenerPid) {
-       kill(rxk_ListenerPid, SIGUSR1);
-       afs_osi_Sleep(&rxk_ListenerPid);
-    }
-    return 0;
+    /* Schedule this to run again after afs_if_poll_interval seconds */
+    afs_if_poller_timeout = timeout((void(*) (void *)) osi_StartNetIfPoller,
+        NULL, drv_usectohz((clock_t)afs_if_poll_interval * MICROSEC));
 }
 
-
-int
-osi_NetSend(osi_socket asocket, struct sockaddr_in *addr, struct iovec *dvec,
-           int nvecs, afs_int32 asize, int istack)
+void
+osi_StopNetIfPoller(void)
 {
-    int i;
-    int code;
-    TIUSER *udp_tiptr = (TIUSER *) asocket;
-    struct t_kunitdata *udreq;
-    struct sockaddr_in sin;
-    mblk_t *bp;
-    mblk_t *dbp;
-
-    /*
-     * XXX We don't do any checking on the family since it's assumed to be
-     * AF_INET XXX
-     */
-    sin.sin_family = AF_INET;
-    sin.sin_addr.s_addr = addr->sin_addr.s_addr;
-    sin.sin_port = addr->sin_port;
-
-    /*
-     * Get a buffer for the RX header
-     */
-    if (nvecs < 1) {
-       osi_Panic("osi_NetSend, nvecs=%d\n", nvecs);
-    }
-    while (!(bp = allocb(dvec[0].iov_len, BPRI_LO))) {
-       if (strwaitbuf(dvec[i].iov_len, BPRI_LO)) {
-           return (ENOSR);
-       }
-    }
+    /* it's okay if untimeout races with StartNetIfPoller/NetIfPoller;
+     * it can handle being passed invalid ids. If StartNetIfPoller is
+     * in the middle of running, untimeout will not return until
+     * StartNetIfPoller is done */
+    untimeout(afs_if_poller_timeout);
 
-    /* Copy the data into the buffer */
-    memcpy((char *)bp->b_wptr, (char *)dvec[0].iov_base, dvec[0].iov_len);
-    bp->b_datap->db_type = M_DATA;
-    bp->b_wptr += dvec[0].iov_len;
-
-    /*
-     * Append each element in the iovec to the buffer
-     */
-    for (i = 1; i < nvecs; i++) {
-       /* Get a buffer for the next chunk */
-       while (!(dbp = allocb(dvec[i].iov_len, BPRI_LO))) {
-           if (strwaitbuf(dvec[i].iov_len, BPRI_LO)) {
-               freeb(bp);
-               return (ENOSR);
-           }
-       }
+    /* if NetIfPoller is queued or running, ddi_taskq_destroy will not
+     * return until it is done */
+    ddi_taskq_destroy(afs_taskq);
 
-       /* Copy the data into the buffer */
-       memcpy((char *)dbp->b_wptr, (char *)dvec[i].iov_base,
-              dvec[i].iov_len);
-       dbp->b_datap->db_type = M_DATA;
-       dbp->b_wptr += dvec[i].iov_len;
-
-       /* Append it to the message buffer */
-       linkb(bp, dbp);
-    }
+    rw_destroy(&afsifinfo_lock);
 
-    /*
-     * Allocate and format the unitdata structure.
-     */
-    code = t_kalloc(udp_tiptr, T_UNITDATA, T_UDATA, (char **)&udreq);
-    if (code) {
-       freeb(bp);
-       printf("osi_NetSend: t_kalloc failed %d\n", code);
-       return code;
+    if (afs_termState == AFSOP_STOP_NETIF) {
+       afs_termState = AFSOP_STOP_COMPLETE;
+       osi_rxWakeup(&afs_termState);
     }
-    udreq->addr.len = sizeof(struct sockaddr_in);
-    udreq->addr.maxlen = sizeof(struct sockaddr_in);
-    udreq->addr.buf =
-       (char *)kmem_alloc(sizeof(struct sockaddr_in), KM_SLEEP);
-    udreq->opt.len = 0;
-    udreq->opt.maxlen = 0;
-    memcpy(udreq->addr.buf, (char *)&sin, sizeof(struct sockaddr_in));
-    udreq->udata.udata_mp = bp;
-    udreq->udata.len = asize;
-
-    code = t_ksndudata(udp_tiptr, udreq, NULL);
-    if (code) {
-       printf("osi_NetSend: t_ksndudata failed %d\n", code);
-    }
-
-    t_kfree(udp_tiptr, (caddr_t) udreq, T_UNITDATA);
-    return code;
 }
+#endif /* AFS_SUN510_ENV */
 
-
-int
-osi_NetReceive(osi_socket *asocket, struct sockaddr_in *addr,
-              struct iovec *dvec, int nvecs, int *alength)
+void
+shutdown_rxkernel(void)
 {
-    int i;
-    TIUSER *udp_tiptr = (TIUSER *) asocket;
-    struct t_kunitdata *udreq;
-    mblk_t *dbp;
-    char *phandle;
-    short sport;
-    int code = 0;
-    int length;
-    int tlen;
-    int blen;
-    char *tbase;
-    int type;
-    int error;
-    int events;
-
-    /*
-     * Allocate the unitdata structure.
-     */
-    code = t_kalloc(udp_tiptr, T_UNITDATA, T_UDATA, (char **)&udreq);
-    if (code) {
-       printf("osi_NetReceive: t_kalloc failed %d\n", code);
-       return code;
-    }
-    udreq->addr.len = sizeof(struct sockaddr_in);
-    udreq->addr.maxlen = sizeof(struct sockaddr_in);
-    udreq->addr.buf =
-       (char *)kmem_alloc(sizeof(struct sockaddr_in), KM_SLEEP);
-    udreq->opt.len = 0;
-    udreq->opt.maxlen = 0;
-
-    /*
-     * Loop until we get an error or receive some data.
-     */
-    while (1) {
-       /*
-        * Wait until there is something to do
-        */
-       code = t_kspoll(udp_tiptr, -1, READWAIT, &events);
-       if (events == 0) {
-           osi_Panic("osi_NetReceive, infinite t_kspoll timed out\n");
-       }
-       /*
-        * If there is a message then read it in
-        */
-       if (code == 0) {
-           code = t_krcvudata(udp_tiptr, udreq, &type, &error);
-       }
-
-       /*
-        * Block attempts to kill this thread
-        */
-       if (code == EINTR && ISSIG(curthread, FORREAL)) {
-           klwp_t *lwp = ttolwp(curthread);
-           proc_t *p = ttoproc(curthread);
-           int sig = lwp->lwp_cursig;
-
-           if (sig == SIGKILL) {
-               mutex_enter(&p->p_lock);
-               p->p_flag &= ~SKILLED;
-               mutex_exit(&p->p_lock);
-           }
-           lwp->lwp_cursig = 0;
-           if (lwp->lwp_curinfo) {
-               kmem_free((caddr_t) lwp->lwp_curinfo,
-                         sizeof(*lwp->lwp_curinfo));
-               lwp->lwp_curinfo = NULL;
-           }
-       }
-
-       if (code) {
-           break;
-       }
-
-       /*
-        * Ignore non-data message types
-        */
-       if (type != T_DATA) {
-           continue;
-       }
-
-       /*
-        * Save the source address
-        */
-       memcpy((char *)addr, udreq->addr.buf, sizeof(struct sockaddr_in));
-
-       /*
-        * Copy out the message buffers, take care not to overflow
-        * the I/O vector.
-        */
-       dbp = udreq->udata.udata_mp;
-       length = *alength;
-       for (i = 0; dbp != NULL && length > 0 && i < nvecs; i++) {
-           tlen = dvec[i].iov_len;
-           tbase = dvec[i].iov_base;
-           if (tlen > length) {
-               tlen = length;
-           }
-           while (dbp != NULL && tlen > 0) {
-               blen = dbp->b_wptr - dbp->b_rptr;
-               if (blen > tlen) {
-                   memcpy(tbase, (char *)dbp->b_rptr, tlen);
-                   length -= tlen;
-                   dbp->b_rptr += tlen;
-                   tlen = 0;
-               } else {
-                   memcpy(tbase, (char *)dbp->b_rptr, blen);
-                   length -= blen;
-                   tlen -= blen;
-                   tbase += blen;
-                   dbp = dbp->b_cont;
-               }
-           }
-       }
-       *alength = *alength - length;
-       break;
-    }
-
-    t_kfree(udp_tiptr, (caddr_t) udreq, T_UNITDATA);
-    return code;
 }
 
-
 void
 osi_StopListener(void)
 {
     osi_FreeSocket(rx_socket);
 }
 
-
-void
-shutdown_rxkernel(void)
-{
-}
-
-
-#endif /* AFS_SUN56_ENV */
 #endif /* AFS_SUN5_ENV */