|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T t
Length: 3723 (0xe8b) Types: TextFile Names: »tsaprespond.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦e83f91978⟧ »EurOpenD22/isode/osimis-2.0.tar.Z« └─⟦d846658bd⟧ └─⟦this⟧ »osimis/misode/tsap/tsaprespond.c« └─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« └─⟦de7628f85⟧ └─⟦this⟧ »isode-6.0/tsap/tsaprespond.c«
/* tsaprespond.c - TPM: responder */ #ifndef lint static char *rcsid = "$Header: /f/osi/tsap/RCS/tsaprespond.c,v 7.0 89/11/23 22:30:55 mrose Rel $"; #endif /* * $Header: /f/osi/tsap/RCS/tsaprespond.c,v 7.0 89/11/23 22:30:55 mrose Rel $ * * * $Log: tsaprespond.c,v $ * Revision 7.0 89/11/23 22:30:55 mrose * Release 6.0 * */ /* * NOTICE * * Acquisition, use, and distribution of this module and related * materials are subject to the restrictions of a license agreement. * Consult the Preface in the User's Manual for the full terms of * this agreement. * */ /* LINTLIBRARY */ #include <stdio.h> #include "tpkt.h" #include "tailor.h" /* \f T-CONNECT.INDICATION */ int TInit (vecp, vec, ts, td) register int vecp; register char **vec; register struct TSAPstart *ts; register struct TSAPdisconnect *td; { register struct tsapblk *tb; isodetailor (NULLCP, 0); if (vecp < 3) return tsaplose (td, DR_PARAMETER, NULLCP, "bad initialization vector"); missingP (vec); missingP (ts); missingP (td); if ((tb = newtblk ()) == NULL) return tsaplose (td, DR_CONGEST, NULLCP, "out of memory"); vec += vecp - 2; switch (*vec[0]) { case NT_TCP: #ifdef TCP if (tcprestore (tb, vec[0] + 1, td) == NOTOK) goto out; break; #else goto not_supported; #endif case NT_X25: #ifdef X25 if (x25restore (tb, vec[0] + 1, td) == NOTOK) goto out; break; #else goto not_supported; #endif case NT_BRG: #ifdef BRIDGE_X25 if (bridgerestore (tb, vec[0] + 1, td) == NOTOK) goto out; break; #else goto not_supported; #endif case NT_BSD: #ifdef BSD_TP4 if (tp4restore (tb, vec[0] + 1, td) == NOTOK) goto out; break; #else goto not_supported; #endif case NT_SUN: #ifdef SUN_TP4 if (tp4restore (tb, vec[0] + 1, td) == NOTOK) goto out; break; #else goto not_supported; #endif default: (void) tsaplose (td, DR_PARAMETER, NULLCP, "unknown network type: 0x%x (%c)", *vec[0], *vec[0]); goto out; } bzero (vec[0], strlen (vec[0])); if ((*tb -> tb_startPfnx) (tb, vec[1], ts, td) == NOTOK) goto out; bzero (vec[1], strlen (vec[1])); *vec = NULL; return OK; not_supported: ; (void) tsaplose (td, DR_PARAMETER, NULLCP, "not configured for network type: 0x%x (%c)", *vec[0], *vec[0]); out: ; freetblk (tb); return NOTOK; } /* \f T-CONNECT.RESPONSE */ int TConnResponse (sd, responding, expedited, data, cc, qos, td) int sd; register struct TSAPaddr *responding; int expedited, cc; char *data; struct QOStype *qos; register struct TSAPdisconnect *td; { int result; register struct tsapblk *tb; if ((tb = findtblk (sd)) == NULL || (tb -> tb_flags & TB_CONN)) return tsaplose (td, DR_PARAMETER, NULLCP, "invalid transport descriptor"); #ifdef notdef missingP (responding); #endif if (responding) { if (bcmp ((char *) &tb -> tb_responding, (char *) responding, sizeof *responding)) tb -> tb_responding = *responding; /* struct copy */ else responding = NULLTA; } if (expedited && !(tb -> tb_flags & TB_EXPD)) return tsaplose (td, DR_PARAMETER, NULLCP, "expedited service not available"); toomuchP (data, cc, TC_SIZE, "initial"); #ifdef notdef missingP (qos); #endif missingP (td); if (!expedited) tb -> tb_flags &= ~TB_EXPD; if ((result = (*tb -> tb_acceptPfnx) (tb, responding ? 1 : 0, data, cc, qos, td)) == NOTOK) freetblk (tb); #ifdef X25 else if (tb -> tb_flags & TB_X25) LLOG (x25_log, LLOG_NOTICE, ("connection %d from %s", sd, na2str (tb -> tb_initiating.ta_addrs))); #endif return result; }