diff options
author | jamey <jamey> | 2005-10-31 23:09:06 +0000 |
---|---|---|
committer | jamey <jamey> | 2005-10-31 23:09:06 +0000 |
commit | 429ed4219a23e356fbbf0066a4330353e4e764a2 (patch) | |
tree | d928257f9b7715dad66711e065a9765252bfbaae /src/tet3/inetlib/listn.c | |
parent | 41fe38e5829b9ef59b67fae5d08ee0ca5ea6b803 (diff) |
Importing TET 3.3h (unsupported) sources from http://tetworks.opengroup.org/tet/tet3.3h-unsup.src.tgz.
Omitted the contrib directory: we don't care, and the license situation wasn't entirely clear.
Diffstat (limited to 'src/tet3/inetlib/listn.c')
-rw-r--r-- | src/tet3/inetlib/listn.c | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/tet3/inetlib/listn.c b/src/tet3/inetlib/listn.c new file mode 100644 index 00000000..bfff74e7 --- /dev/null +++ b/src/tet3/inetlib/listn.c @@ -0,0 +1,65 @@ +/* + * SCCS: @(#)listn.c 1.9 (97/07/21) + * + * UniSoft Ltd., London, England + * + * (C) Copyright 1992 X/Open Company Limited + * + * All rights reserved. No part of this source code may be reproduced, + * stored in a retrieval system, or transmitted, in any form or by any + * means, electronic, mechanical, photocopying, recording or otherwise, + * except as stated in the end-user licence agreement, without the prior + * permission of the copyright owners. + * + * X/Open and the 'X' symbol are trademarks of X/Open Company Limited in + * the UK and other countries. + */ + +#ifndef lint +static char sccsid[] = "@(#)listn.c 1.9 (97/07/21) TET3 release 3.3"; +#endif + +/************************************************************************ + +SCCS: @(#)listn.c 1.9 97/07/21 TETware release 3.3 +NAME: listn.c +PRODUCT: TETware +AUTHOR: Andrew Dingwall, UniSoft Ltd. +DATE CREATED: April 1992 + +DESCRIPTION: + function to listen on an INET socket + +MODIFICATIONS: + +************************************************************************/ + +#include <errno.h> +#include <sys/types.h> +# include <netinet/in.h> +#include "dtmac.h" +#include "error.h" +#include "ltoa.h" +#include "time.h" +#include "dtmsg.h" +#include "ptab.h" +#include "inetlib_in.h" + +#ifdef NEEDsrcFile +static char srcFile[] = __FILE__; /* file name for error reporting */ +#endif + + +/* +** tet_ts_listen() - arrange to listen on the incoming message socket +*/ + +void tet_ts_listen(sd) +SOCKET sd; +{ + TRACE2(tet_Tio, 4, "listen on sd %s", tet_i2a(sd)); + + if (listen(sd, 10) == SOCKET_ERROR) + fatal(SOCKET_ERRNO, "listen() failed on sd", tet_i2a(sd)); +} + |