|
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: 2439 (0x987) Types: TextFile Names: »tsapmisc.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦e83f91978⟧ »EurOpenD22/isode/osimis-2.0.tar.Z« └─⟦d846658bd⟧ └─⟦this⟧ »osimis/misode/tsap/tsapmisc.c« └─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« └─⟦de7628f85⟧ └─⟦this⟧ »isode-6.0/tsap/tsapmisc.c«
/* tsapmisc.c - miscellany tsap functions */ #ifndef lint static char *rcsid = "$Header: /f/osi/tsap/RCS/tsapmisc.c,v 7.0 89/11/23 22:30:54 mrose Rel $"; #endif /* * $Header: /f/osi/tsap/RCS/tsapmisc.c,v 7.0 89/11/23 22:30:54 mrose Rel $ * * * $Log: tsapmisc.c,v $ * Revision 7.0 89/11/23 22:30:54 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 <signal.h> #include "tpkt.h" #include <sys/ioctl.h> /* \f estimate of octets that might be returned */ int TSelectOctets (sd, nbytes, td) int sd; long *nbytes; register struct TSAPdisconnect *td; { int result; long value; SBV smask; register struct tsapblk *tb; missingP (nbytes); missingP (td); smask = sigioblock (); tsapPsig (tb, sd); result = OK; if (tb -> tb_nreadfnx) { if ((result = (*tb -> tb_nreadfnx) (tb, &value)) == NOTOK) value = 0L; } else { if (ioctl (tb -> tb_fd, FIONREAD, (char *) &value) == NOTOK) value = 0L; switch (tb -> tb_flags & (TB_TP0 | TB_TP4)) { case TB_TCP: case TB_X25: case TB_BRG: if (value > DT_MAGIC && tb -> tb_len == 0) value -= DT_MAGIC; break; default: break; } } if (result == OK) value += (long) tb -> tb_len; *nbytes = value; (void) sigiomask (smask); return result; } /* \f get TSAPs */ int TGetAddresses (sd, initiating, responding, td) int sd; struct TSAPaddr *initiating, *responding; register struct TSAPdisconnect *td; { SBV smask; register struct tsapblk *tb; missingP (td); smask = sigioblock (); tsapPsig (tb, sd); if (initiating) *initiating = tb -> tb_initiating; /* struct copy */ if (responding) *responding = tb -> tb_responding; /* struct copy */ (void) sigiomask (smask); return OK; } /* \f define transport manager */ #ifdef MGMT int TSetManager (sd, fnx, td) int sd; IFP fnx; register struct TSAPdisconnect *td; { SBV smask; register struct tsapblk *tb; missingP (td); smask = sigioblock (); tsapPsig (tb, sd); tb -> tb_manfnx = fnx; (void) sigiomask (smask); return OK; } #endif