diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-01-30 09:23:36 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-01-30 09:23:36 +0000 |
commit | 76e3520e1f6b7df33cd381a2cf4f1fce3d69c8a4 (patch) | |
tree | 1d4e5f5653fd9def6bd71cc0cb536400223f4d3e /ipsock.h | |
parent | 6ad3d225cec2692b410002582f5558652eea32c8 (diff) | |
download | perl-76e3520e1f6b7df33cd381a2cf4f1fce3d69c8a4.tar.gz |
[asperl] added AS patch#2
p4raw-id: //depot/asperl@443
Diffstat (limited to 'ipsock.h')
-rw-r--r-- | ipsock.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/ipsock.h b/ipsock.h new file mode 100644 index 0000000000..5dd9de9fed --- /dev/null +++ b/ipsock.h @@ -0,0 +1,59 @@ +/* + + ipsock.h + Interface for perl socket functions + +*/ + +#ifndef __Inc__IPerlSock___ +#define __Inc__IPerlSock___ + +class IPerlSock +{ +public: + virtual u_long Htonl(u_long hostlong) = 0; + virtual u_short Htons(u_short hostshort) = 0; + virtual u_long Ntohl(u_long netlong) = 0; + virtual u_short Ntohs(u_short netshort) = 0; + virtual SOCKET Accept(SOCKET s, struct sockaddr* addr, int* addrlen, int &err) = 0; + virtual int Bind(SOCKET s, const struct sockaddr* name, int namelen, int &err) = 0; + virtual int Connect(SOCKET s, const struct sockaddr* name, int namelen, int &err) = 0; + virtual void Endhostent(int &err) = 0; + virtual void Endnetent(int &err) = 0; + virtual void Endprotoent(int &err) = 0; + virtual void Endservent(int &err) = 0; + virtual struct hostent* Gethostbyaddr(const char* addr, int len, int type, int &err) = 0; + virtual struct hostent* Gethostbyname(const char* name, int &err) = 0; + virtual struct hostent* Gethostent(int &err) = 0; + virtual int Gethostname(char* name, int namelen, int &err) = 0; + virtual struct netent *Getnetbyaddr(long net, int type, int &err) = 0; + virtual struct netent *Getnetbyname(const char *, int &err) = 0; + virtual struct netent *Getnetent(int &err) = 0; + virtual int Getpeername(SOCKET s, struct sockaddr* name, int* namelen, int &err) = 0; + virtual struct protoent* Getprotobyname(const char* name, int &err) = 0; + virtual struct protoent* Getprotobynumber(int number, int &err) = 0; + virtual struct protoent* Getprotoent(int &err) = 0; + virtual struct servent* Getservbyname(const char* name, const char* proto, int &err) = 0; + virtual struct servent* Getservbyport(int port, const char* proto, int &err) = 0; + virtual struct servent* Getservent(int &err) = 0; + virtual int Getsockname(SOCKET s, struct sockaddr* name, int* namelen, int &err) = 0; + virtual int Getsockopt(SOCKET s, int level, int optname, char* optval, int* optlen, int &err) = 0; + virtual unsigned long InetAddr(const char* cp, int &err) = 0; + virtual char* InetNtoa(struct in_addr in, int &err) = 0; + virtual int Listen(SOCKET s, int backlog, int &err) = 0; + virtual int Recvfrom(SOCKET s, char* buf, int len, int flags, struct sockaddr* from, int* fromlen, int &err) = 0; + virtual int Select(int nfds, char* readfds, char* writefds, char* exceptfds, const struct timeval* timeout, int &err) = 0; + virtual int Send(SOCKET s, const char* buf, int len, int flags, int &err) = 0; + virtual int Sendto(SOCKET s, const char* buf, int len, int flags, const struct sockaddr* to, int tolen, int &err) = 0; + virtual void Sethostent(int stayopen, int &err) = 0; + virtual void Setnetent(int stayopen, int &err) = 0; + virtual void Setprotoent(int stayopen, int &err) = 0; + virtual void Setservent(int stayopen, int &err) = 0; + virtual int Setsockopt(SOCKET s, int level, int optname, const char* optval, int optlen, int &err) = 0; + virtual int Shutdown(SOCKET s, int how, int &err) = 0; + virtual SOCKET Socket(int af, int type, int protocol, int &err) = 0; + virtual int Socketpair(int domain, int type, int protocol, int* fds, int &err) = 0; +}; + +#endif /* __Inc__IPerlSock___ */ + |