repo.or.cz
/
linux-2.6.9-moxart.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git]
/
drivers
/
char
/
mxhwenp
/
test
/
netp.h
blob
cfa84e3866c24ed93b935de1bca104cb49ce89d2
1
#if defined(WIN32)
2
#include <windows.h>
3
#include <winsock.h>
4
#else
5
#include <sys/socket.h>
6
#include <unistd.h>
7
#include <netinet/in.h>
8
#include <arpa/inet.h>
9
#include <netdb.h>
10
#endif
/* WIN32 */
11
#include <sys/types.h>
12
#include <ctype.h>
13
#include <stdlib.h>
14
15
#if defined(WIN32)
16
typedef
unsigned int
socklen_t
;
17
typedef
long
ssize_t
;
18
#define read(a,b,c) recv(a,b,c,0)
19
#define write(a,b,c) send(a,b,c,0)
20
#define close closesocket
21
#endif
/* WIN32 */
22
23
#define SERVER_PORT 51234
24
#define MAX_LEN 2048
25