TCP-IP



         

Windows


skel.h

Windows etcp. h, UNIX ( 1.1). skel. h, Windows 2.1.

2.1. skel.h Windows

1 #ifndef _SKEL_H_

2 #define _SKEL_H_

3 /* Winsock. */

4 #include <windows.h>

5 #include <winsock2.h>

6 struct timezone

7 {

8 long tz_minuteswest;

9 long tz_dsttime;

10 };

11 typedef unsigned int u_int32_t;

12 #define EMSGSIZE WSAEMSGSIZE

13 #define INITO init ( argv ) ;

14 #define EXIT(s) do { WSACleanup () ; exit ( ( s ) ) ; } \

15 while ( 0 )

16 #define CLOSE (s) if ( closesocket( s ) ) \

17 error( 1, errno, " close")

18 #define errno ( GetLastError() )

19 #define set_errno(e) SetLastError( ( e ) )

20 #define isvalidsock(s) ( ( s ) != SOCKET_ERROR )

21 #define bzero(b,n) memset ( ( b ), 0, ( n ) )

22 #define sleep(t) Sleep( ( t ) * 1000 )

23 #define WINDOWS

24 #endif /* _SKEL_H_ */