|
|
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: 1053 (0x41d)
Types: TextFile
Names: »tcp.c«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
└─⟦697af93db⟧ »EurOpenD3/network/snmp/mit-snmp.tar.Z«
└─⟦57bbcbe75⟧
└─⟦this⟧ »./bsd/tcp.c«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
└─⟦925ee6880⟧ »EurOpenD3/network/snmp/mit-snmp.900225.tar.Z«
└─⟦a4bfa469c⟧
└─⟦this⟧ »./bsd/tcp.c«
/*
* $Header: tcp.c,v 1.1 89/01/11 22:10:44 jrd Exp $
* Author: J. Davin
* Copyright 1988, 1989, Massachusetts Institute of Technology
* See permission and disclaimer notice in file "notice.h"
*/
#include <notice.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <ctypes.h>
#include <debug.h>
#include <tcp.h>
SmpStatusType tcpSend (tcp, cp, n)
SmpSocketType tcp;
CBytePtrType cp;
CIntfType n;
{
int result;
if (tcp == (SmpSocketType) 0) {
return (errBad);
}
do {
result = send ((int) tcp, (char *) cp,
(int) n, (int) 0);
n -= result;
cp += result;
} while ((result > 0) && (n > 0));
if (result < 0) {
perror ("tcpSend");
return (errBad);
}
else {
return (errOk);
}
}
SmpSocketType tcpNew (so, host, port)
int so;
char *host;
u_short port;
{
host = host;
port = port;
return ((SmpSocketType) so);
}
SmpSocketType tcpFree (tcp)
SmpSocketType tcp;
{
tcp = tcp;
return ((SmpSocketType) 0);
}