17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 57c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 67c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 77c478bd9Sstevel@tonic-gate * with the License. 87c478bd9Sstevel@tonic-gate * 97c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 107c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 117c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 127c478bd9Sstevel@tonic-gate * and limitations under the License. 137c478bd9Sstevel@tonic-gate * 147c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 157c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 167c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 177c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 187c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 197c478bd9Sstevel@tonic-gate * 207c478bd9Sstevel@tonic-gate * CDDL HEADER END 217c478bd9Sstevel@tonic-gate */ 2261961e0fSrobinson 237c478bd9Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 247c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate /* 27*e8031f0aSraf * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 287c478bd9Sstevel@tonic-gate * Use is subject to license terms. 297c478bd9Sstevel@tonic-gate */ 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 327c478bd9Sstevel@tonic-gate 3361961e0fSrobinson /* 3461961e0fSrobinson * interface( label ) 3561961e0fSrobinson * provide alternate definitions for the I/O functions through global 3661961e0fSrobinson * interfaces. 377c478bd9Sstevel@tonic-gate */ 38*e8031f0aSraf #include "mt.h" 397c478bd9Sstevel@tonic-gate #include "uucp.h" 4061961e0fSrobinson #include <unistd.h> 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gate #ifdef TLI 437c478bd9Sstevel@tonic-gate #include <tiuser.h> 447c478bd9Sstevel@tonic-gate #endif /* TLI */ 457c478bd9Sstevel@tonic-gate 4661961e0fSrobinson static void sethup(int); 4761961e0fSrobinson static int restline(void); 4861961e0fSrobinson static int usetup(int, int *, int *); 4961961e0fSrobinson static int uteardown(int, int, int); 507c478bd9Sstevel@tonic-gate 5161961e0fSrobinson static ssize_t (*Read)() = read, 527c478bd9Sstevel@tonic-gate (*Write)() = write; 5361961e0fSrobinson static int (*Ioctl)(int, int, ...) = ioctl, 5461961e0fSrobinson (*Setup)() = usetup; 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate #ifdef TLI 5761961e0fSrobinson static void tfaillog(int fd, const char *s); 5861961e0fSrobinson static void show_tlook(int); 5961961e0fSrobinson static ssize_t tread(int, char *, unsigned); 6061961e0fSrobinson static ssize_t twrite(int, char *, unsigned); 6161961e0fSrobinson static int tioctl(int, int, ...); 6261961e0fSrobinson static int tsetup(int, int *, int *); /* TLI setup without streams module */ 6361961e0fSrobinson static int tssetup(int, int *, int *); /* TLI setup with streams module */ 6461961e0fSrobinson static int tteardown(int, int, int); /* TLI teardown, works with either setup */ 657c478bd9Sstevel@tonic-gate #endif /* TLI */ 667c478bd9Sstevel@tonic-gate 6761961e0fSrobinson /* 6861961e0fSrobinson * The IN_label in Interface[] imply different caller routines: 6961961e0fSrobinson * e.g. tlicall(). 7061961e0fSrobinson * If so, the names here and the names in callers.c must match. 7161961e0fSrobinson */ 7261961e0fSrobinson static struct Interface { 737c478bd9Sstevel@tonic-gate const char *IN_label; /* interface name */ 747c478bd9Sstevel@tonic-gate ssize_t (*IN_read)(); /* read function */ 757c478bd9Sstevel@tonic-gate ssize_t (*IN_write)(); /* write function */ 767c478bd9Sstevel@tonic-gate int (*IN_ioctl)(int, int, ...); 7761961e0fSrobinson int (*IN_setup)(); /* setup function, called before */ 7861961e0fSrobinson /* first i/o operation */ 7961961e0fSrobinson int (*IN_teardown)(); /* teardown function, called after */ 8061961e0fSrobinson /* last i/o operation */ 817c478bd9Sstevel@tonic-gate } Interface[] = { 827c478bd9Sstevel@tonic-gate /* vanilla UNIX */ 837c478bd9Sstevel@tonic-gate { "UNIX", read, write, ioctl, usetup, uteardown }, 847c478bd9Sstevel@tonic-gate #ifdef TLI 857c478bd9Sstevel@tonic-gate /* AT&T Transport Interface Library WITHOUT streams */ 867c478bd9Sstevel@tonic-gate { "TLI", tread, twrite, tioctl, tsetup, tteardown }, 877c478bd9Sstevel@tonic-gate #ifdef TLIS 887c478bd9Sstevel@tonic-gate /* AT&T Transport Interface Library WITH streams */ 897c478bd9Sstevel@tonic-gate { "TLIS", read, write, tioctl, tssetup, uteardown }, 907c478bd9Sstevel@tonic-gate #endif /* TLIS */ 917c478bd9Sstevel@tonic-gate #endif /* TLI */ 927c478bd9Sstevel@tonic-gate { 0, 0, 0, 0, 0, 0 } 937c478bd9Sstevel@tonic-gate }; 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gate 9661961e0fSrobinson static int 9761961e0fSrobinson interface(const char *label) 987c478bd9Sstevel@tonic-gate { 9961961e0fSrobinson int i; 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gate for (i = 0; Interface[i].IN_label; ++i) { 10261961e0fSrobinson if (strcmp(Interface[i].IN_label, label) == 0) { 1037c478bd9Sstevel@tonic-gate Read = Interface[i].IN_read; 1047c478bd9Sstevel@tonic-gate Write = Interface[i].IN_write; 1057c478bd9Sstevel@tonic-gate Ioctl = Interface[i].IN_ioctl; 1067c478bd9Sstevel@tonic-gate Setup = Interface[i].IN_setup; 1077c478bd9Sstevel@tonic-gate DEBUG(5, "set interface %s\n", label); 1087c478bd9Sstevel@tonic-gate return (0); 1097c478bd9Sstevel@tonic-gate } 1107c478bd9Sstevel@tonic-gate } 1117c478bd9Sstevel@tonic-gate return (FAIL); 1127c478bd9Sstevel@tonic-gate } 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gate /* 1157c478bd9Sstevel@tonic-gate * usetup - vanilla unix setup routine 1167c478bd9Sstevel@tonic-gate */ 1177c478bd9Sstevel@tonic-gate static int 1187c478bd9Sstevel@tonic-gate usetup(int role, int *fdreadp, int *fdwritep) 1197c478bd9Sstevel@tonic-gate { 1207c478bd9Sstevel@tonic-gate if (role == SLAVE) { 1217c478bd9Sstevel@tonic-gate *fdreadp = 0; 1227c478bd9Sstevel@tonic-gate *fdwritep = 1; 1237c478bd9Sstevel@tonic-gate /* 2 has been re-opened to RMTDEBUG in main() */ 1247c478bd9Sstevel@tonic-gate } 1257c478bd9Sstevel@tonic-gate return (SUCCESS); 1267c478bd9Sstevel@tonic-gate } 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate /* 1297c478bd9Sstevel@tonic-gate * uteardown - vanilla unix teardown routine 1307c478bd9Sstevel@tonic-gate */ 1317c478bd9Sstevel@tonic-gate static int 1327c478bd9Sstevel@tonic-gate uteardown(int role, int fdread, int fdwrite) 1337c478bd9Sstevel@tonic-gate { 1347c478bd9Sstevel@tonic-gate char *ttyn; 1357c478bd9Sstevel@tonic-gate 1367c478bd9Sstevel@tonic-gate if (role == SLAVE) { 13761961e0fSrobinson (void) restline(); 1387c478bd9Sstevel@tonic-gate sethup(0); 1397c478bd9Sstevel@tonic-gate } 1407c478bd9Sstevel@tonic-gate if (fdread != -1) { 1417c478bd9Sstevel@tonic-gate ttyn = ttyname(fdread); 1427c478bd9Sstevel@tonic-gate if (ttyn != NULL) 14361961e0fSrobinson /* can fail, but who cares? */ 14461961e0fSrobinson (void) chmod(ttyn, Dev_mode); 1457c478bd9Sstevel@tonic-gate (void) close(fdread); 1467c478bd9Sstevel@tonic-gate (void) close(fdwrite); 1477c478bd9Sstevel@tonic-gate } 1487c478bd9Sstevel@tonic-gate return (SUCCESS); 1497c478bd9Sstevel@tonic-gate } 1507c478bd9Sstevel@tonic-gate 1517c478bd9Sstevel@tonic-gate #ifdef TLI 1527c478bd9Sstevel@tonic-gate /* 1537c478bd9Sstevel@tonic-gate * tread - tli read routine 1547c478bd9Sstevel@tonic-gate */ 1557c478bd9Sstevel@tonic-gate static ssize_t 15661961e0fSrobinson tread(int fd, char *buf, unsigned nbytes) 1577c478bd9Sstevel@tonic-gate { 1587c478bd9Sstevel@tonic-gate int rcvflags; 1597c478bd9Sstevel@tonic-gate 16061961e0fSrobinson return ((ssize_t)t_rcv(fd, buf, nbytes, &rcvflags)); 1617c478bd9Sstevel@tonic-gate } 1627c478bd9Sstevel@tonic-gate 1637c478bd9Sstevel@tonic-gate /* 1647c478bd9Sstevel@tonic-gate * twrite - tli write routine 1657c478bd9Sstevel@tonic-gate */ 1667c478bd9Sstevel@tonic-gate #define N_CHECK 100 1677c478bd9Sstevel@tonic-gate static ssize_t 16861961e0fSrobinson twrite(int fd, char *buf, unsigned nbytes) 1697c478bd9Sstevel@tonic-gate { 17061961e0fSrobinson int i, ret; 1717c478bd9Sstevel@tonic-gate static int n_writ, got_info; 1727c478bd9Sstevel@tonic-gate static struct t_info info; 1737c478bd9Sstevel@tonic-gate 1747c478bd9Sstevel@tonic-gate if (got_info == 0) { 1757c478bd9Sstevel@tonic-gate if (t_getinfo(fd, &info) != 0) { 1767c478bd9Sstevel@tonic-gate tfaillog(fd, "twrite: t_getinfo\n"); 1777c478bd9Sstevel@tonic-gate return (FAIL); 1787c478bd9Sstevel@tonic-gate } 1797c478bd9Sstevel@tonic-gate got_info = 1; 1807c478bd9Sstevel@tonic-gate } 1817c478bd9Sstevel@tonic-gate 1827c478bd9Sstevel@tonic-gate /* on every N_CHECKth call, check that are still in DATAXFER state */ 1837c478bd9Sstevel@tonic-gate if (++n_writ == N_CHECK) { 1847c478bd9Sstevel@tonic-gate n_writ = 0; 18561961e0fSrobinson if (t_getstate(fd) != T_DATAXFER) 1867c478bd9Sstevel@tonic-gate return (FAIL); 1877c478bd9Sstevel@tonic-gate } 1887c478bd9Sstevel@tonic-gate 18961961e0fSrobinson if (info.tsdu <= 0 || nbytes <= info.tsdu) 19061961e0fSrobinson return ((ssize_t)t_snd(fd, buf, nbytes, NULL)); 1917c478bd9Sstevel@tonic-gate /* if get here, then there is a limit on transmit size */ 1927c478bd9Sstevel@tonic-gate /* (info.tsdu > 0) and buf exceeds it */ 1937c478bd9Sstevel@tonic-gate i = ret = 0; 1947c478bd9Sstevel@tonic-gate while (nbytes >= info.tsdu) { 19561961e0fSrobinson if ((ret = t_snd(fd, &buf[i], info.tsdu, NULL)) != info.tsdu) 1967c478bd9Sstevel@tonic-gate return ((ssize_t)(ret >= 0 ? (i + ret) : ret)); 1977c478bd9Sstevel@tonic-gate i += info.tsdu; 1987c478bd9Sstevel@tonic-gate nbytes -= info.tsdu; 1997c478bd9Sstevel@tonic-gate } 2007c478bd9Sstevel@tonic-gate if (nbytes != 0) { 20161961e0fSrobinson if ((ret = t_snd(fd, &buf[i], nbytes, NULL)) != nbytes) 2027c478bd9Sstevel@tonic-gate return ((ssize_t)(ret >= 0 ? (i + ret) : ret)); 2037c478bd9Sstevel@tonic-gate i += nbytes; 2047c478bd9Sstevel@tonic-gate } 2057c478bd9Sstevel@tonic-gate return ((ssize_t)i); 2067c478bd9Sstevel@tonic-gate } 2077c478bd9Sstevel@tonic-gate 2087c478bd9Sstevel@tonic-gate /* 2097c478bd9Sstevel@tonic-gate * tioctl - stub for tli ioctl routine 2107c478bd9Sstevel@tonic-gate */ 2117c478bd9Sstevel@tonic-gate /* ARGSUSED */ 2127c478bd9Sstevel@tonic-gate static int 2137c478bd9Sstevel@tonic-gate tioctl(int fd, int request, ...) 2147c478bd9Sstevel@tonic-gate { 2157c478bd9Sstevel@tonic-gate return (SUCCESS); 2167c478bd9Sstevel@tonic-gate } 2177c478bd9Sstevel@tonic-gate 2187c478bd9Sstevel@tonic-gate /* 2197c478bd9Sstevel@tonic-gate * tsetup - tli setup routine 2207c478bd9Sstevel@tonic-gate * note blatant assumption that *fdreadp == *fdwritep == 0 2217c478bd9Sstevel@tonic-gate */ 2227c478bd9Sstevel@tonic-gate static int 2237c478bd9Sstevel@tonic-gate tsetup(int role, int *fdreadp, int *fdwritep) 2247c478bd9Sstevel@tonic-gate { 2257c478bd9Sstevel@tonic-gate if (role == SLAVE) { 2267c478bd9Sstevel@tonic-gate *fdreadp = 0; 2277c478bd9Sstevel@tonic-gate *fdwritep = 1; 2287c478bd9Sstevel@tonic-gate /* 2 has been re-opened to RMTDEBUG in main() */ 2297c478bd9Sstevel@tonic-gate errno = t_errno = 0; 2307c478bd9Sstevel@tonic-gate if (t_sync(*fdreadp) == -1 || t_sync(*fdwritep) == -1) { 2317c478bd9Sstevel@tonic-gate tfaillog(*fdreadp, "tsetup: t_sync\n"); 2327c478bd9Sstevel@tonic-gate return (FAIL); 2337c478bd9Sstevel@tonic-gate } 2347c478bd9Sstevel@tonic-gate } 2357c478bd9Sstevel@tonic-gate return (SUCCESS); 2367c478bd9Sstevel@tonic-gate } 2377c478bd9Sstevel@tonic-gate 2387c478bd9Sstevel@tonic-gate /* 2397c478bd9Sstevel@tonic-gate * tteardown - tli shutdown routine 2407c478bd9Sstevel@tonic-gate */ 2417c478bd9Sstevel@tonic-gate /* ARGSUSED */ 2427c478bd9Sstevel@tonic-gate static int 2437c478bd9Sstevel@tonic-gate tteardown(int role, int fdread, int fdwrite) 2447c478bd9Sstevel@tonic-gate { 2457c478bd9Sstevel@tonic-gate (void) t_unbind(fdread); 2467c478bd9Sstevel@tonic-gate (void) t_close(fdread); 2477c478bd9Sstevel@tonic-gate return (SUCCESS); 2487c478bd9Sstevel@tonic-gate } 2497c478bd9Sstevel@tonic-gate 2507c478bd9Sstevel@tonic-gate #ifdef TLIS 2517c478bd9Sstevel@tonic-gate /* 2527c478bd9Sstevel@tonic-gate * tssetup - tli, with streams module, setup routine 2537c478bd9Sstevel@tonic-gate * note blatant assumption that *fdreadp == *fdwritep 2547c478bd9Sstevel@tonic-gate */ 2557c478bd9Sstevel@tonic-gate static int 25661961e0fSrobinson tssetup(int role, int *fdreadp, int *fdwritep) 2577c478bd9Sstevel@tonic-gate { 2587c478bd9Sstevel@tonic-gate if (role == SLAVE) { 2597c478bd9Sstevel@tonic-gate *fdreadp = 0; 2607c478bd9Sstevel@tonic-gate *fdwritep = 1; 2617c478bd9Sstevel@tonic-gate /* 2 has been re-opened to RMTDEBUG in main() */ 2627c478bd9Sstevel@tonic-gate DEBUG(5, "tssetup: SLAVE mode: leaving ok\n%s", ""); 2637c478bd9Sstevel@tonic-gate return (SUCCESS); 2647c478bd9Sstevel@tonic-gate } 2657c478bd9Sstevel@tonic-gate 2667c478bd9Sstevel@tonic-gate DEBUG(4, "tssetup: MASTER mode: leaving ok\n%s", ""); 2677c478bd9Sstevel@tonic-gate return (SUCCESS); 2687c478bd9Sstevel@tonic-gate } 2697c478bd9Sstevel@tonic-gate 2707c478bd9Sstevel@tonic-gate /* 2717c478bd9Sstevel@tonic-gate * Report why a TLI call failed. 2727c478bd9Sstevel@tonic-gate */ 27361961e0fSrobinson static void 27461961e0fSrobinson tfaillog(int fd, const char *s) 2757c478bd9Sstevel@tonic-gate { 2767c478bd9Sstevel@tonic-gate char fmt[ BUFSIZ ]; 2777c478bd9Sstevel@tonic-gate 2787c478bd9Sstevel@tonic-gate if (0 < t_errno && t_errno < t_nerr) { 27961961e0fSrobinson (void) snprintf(fmt, sizeof (fmt), "%s: %%s\n", s); 2807c478bd9Sstevel@tonic-gate DEBUG(5, fmt, t_errlist[t_errno]); 2817c478bd9Sstevel@tonic-gate logent(s, t_errlist[t_errno]); 2827c478bd9Sstevel@tonic-gate if (t_errno == TSYSERR) { 28361961e0fSrobinson (void) strcpy(fmt, "tlicall: system error: %s\n"); 2847c478bd9Sstevel@tonic-gate DEBUG(5, fmt, strerror(errno)); 2857c478bd9Sstevel@tonic-gate } else if (t_errno == TLOOK) { 2867c478bd9Sstevel@tonic-gate show_tlook(fd); 2877c478bd9Sstevel@tonic-gate } 2887c478bd9Sstevel@tonic-gate } else { 28961961e0fSrobinson (void) snprintf(fmt, sizeof (fmt), 29061961e0fSrobinson "unknown tli error %d", t_errno); 2917c478bd9Sstevel@tonic-gate logent(s, fmt); 29261961e0fSrobinson (void) snprintf(fmt, sizeof (fmt), 29361961e0fSrobinson "%s: unknown tli error %d", s, t_errno); 2947c478bd9Sstevel@tonic-gate DEBUG(5, fmt, 0); 29561961e0fSrobinson (void) snprintf(fmt, sizeof (fmt), "%s: %%s\n", s); 2967c478bd9Sstevel@tonic-gate DEBUG(5, fmt, strerror(errno)); 2977c478bd9Sstevel@tonic-gate } 2987c478bd9Sstevel@tonic-gate } 2997c478bd9Sstevel@tonic-gate 30061961e0fSrobinson static void 30161961e0fSrobinson show_tlook(int fd) 3027c478bd9Sstevel@tonic-gate { 30361961e0fSrobinson int reason; 30461961e0fSrobinson const char *msg; 3057c478bd9Sstevel@tonic-gate 3067c478bd9Sstevel@tonic-gate /* 3077c478bd9Sstevel@tonic-gate * Find out the current state of the interface. 3087c478bd9Sstevel@tonic-gate */ 3097c478bd9Sstevel@tonic-gate errno = t_errno = 0; 3107c478bd9Sstevel@tonic-gate switch (reason = t_getstate(fd)) { 3117c478bd9Sstevel@tonic-gate case T_UNBND: msg = (const char *)"T_UNBIND"; break; 3127c478bd9Sstevel@tonic-gate case T_IDLE: msg = (const char *)"T_IDLE"; break; 3137c478bd9Sstevel@tonic-gate case T_OUTCON: msg = (const char *)"T_OUTCON"; break; 3147c478bd9Sstevel@tonic-gate case T_INCON: msg = (const char *)"T_INCON"; break; 3157c478bd9Sstevel@tonic-gate case T_DATAXFER: msg = (const char *)"T_DATAXFER"; break; 3167c478bd9Sstevel@tonic-gate case T_OUTREL: msg = (const char *)"T_OUTREL"; break; 3177c478bd9Sstevel@tonic-gate case T_INREL: msg = (const char *)"T_INREL"; break; 3187c478bd9Sstevel@tonic-gate default: msg = NULL; break; 3197c478bd9Sstevel@tonic-gate } 32061961e0fSrobinson if (msg == NULL) 3217c478bd9Sstevel@tonic-gate return; 3227c478bd9Sstevel@tonic-gate DEBUG(5, "state is %s", msg); 3237c478bd9Sstevel@tonic-gate switch (reason = t_look(fd)) { 3247c478bd9Sstevel@tonic-gate case -1: msg = (const char *)""; break; 3257c478bd9Sstevel@tonic-gate case 0: msg = (const char *)"NO ERROR"; break; 3267c478bd9Sstevel@tonic-gate case T_LISTEN: msg = (const char *)"T_LISTEN"; break; 3277c478bd9Sstevel@tonic-gate case T_CONNECT: msg = (const char *)"T_CONNECT"; break; 3287c478bd9Sstevel@tonic-gate case T_DATA: msg = (const char *)"T_DATA"; break; 3297c478bd9Sstevel@tonic-gate case T_EXDATA: msg = (const char *)"T_EXDATA"; break; 3307c478bd9Sstevel@tonic-gate case T_DISCONNECT: msg = (const char *)"T_DISCONNECT"; break; 3317c478bd9Sstevel@tonic-gate case T_ORDREL: msg = (const char *)"T_ORDREL"; break; 3327c478bd9Sstevel@tonic-gate case T_ERROR: msg = (const char *)"T_ERROR"; break; 3337c478bd9Sstevel@tonic-gate case T_UDERR: msg = (const char *)"T_UDERR"; break; 3347c478bd9Sstevel@tonic-gate default: msg = (const char *)"UNKNOWN ERROR"; break; 3357c478bd9Sstevel@tonic-gate } 3367c478bd9Sstevel@tonic-gate DEBUG(4, " reason is %s\n", msg); 3377c478bd9Sstevel@tonic-gate 33861961e0fSrobinson if (reason == T_DISCONNECT) { 3397c478bd9Sstevel@tonic-gate struct t_discon *dropped; 3407c478bd9Sstevel@tonic-gate if (((dropped = 34161961e0fSrobinson /* LINTED pointer cast */ 34261961e0fSrobinson (struct t_discon *)t_alloc(fd, T_DIS, T_ALL)) == 0) || 34361961e0fSrobinson (t_rcvdis(fd, dropped) == -1)) { 3447c478bd9Sstevel@tonic-gate if (dropped) 34561961e0fSrobinson (void) t_free((char *)dropped, T_DIS); 3467c478bd9Sstevel@tonic-gate return; 3477c478bd9Sstevel@tonic-gate } 3487c478bd9Sstevel@tonic-gate DEBUG(5, "disconnect reason #%d\n", dropped->reason); 34961961e0fSrobinson (void) t_free((char *)dropped, T_DIS); 3507c478bd9Sstevel@tonic-gate } 3517c478bd9Sstevel@tonic-gate } 3527c478bd9Sstevel@tonic-gate #endif /* TLIS */ 3537c478bd9Sstevel@tonic-gate #endif /* TLI */ 354