Subversion Repositories Kolibri OS

Rev

Rev 2364 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1250 hidnplayr 1
; Socket types
2853 hidnplayr 2
SOCK_STREAM     = 1
3
SOCK_DGRAM      = 2
4
SOCK_RAW        = 3
1250 hidnplayr 5
 
6
; IP protocols
2853 hidnplayr 7
IPPROTO_IP      = 0
8
IPPROTO_ICMP    = 1
9
IPPROTO_TCP     = 6
10
IPPROTO_UDP     = 17
1250 hidnplayr 11
 
12
; Address families
2853 hidnplayr 13
AF_UNSPEC       = 0
14
AF_LOCAL        = 1
15
AF_INET4        = 2     ; IPv4
16
;AF_INET6        = 28    ; IPv6 (not supported yet)
1250 hidnplayr 17
 
2853 hidnplayr 18
PF_UNSPEC       = AF_UNSPEC
19
PF_LOCAL        = AF_LOCAL
20
PF_INET4        = AF_INET4
21
;PF_INET6        = AF_INET6
1250 hidnplayr 22
 
23
; Flags for addrinfo
2853 hidnplayr 24
AI_PASSIVE      = 1
25
AI_CANONNAME    = 2
26
AI_NUMERICHOST  = 4
27
AI_NUMERICSERV  = 8
28
AI_ADDRCONFIG   = 0x400
1250 hidnplayr 29
 
30
; internal definition
2853 hidnplayr 31
AI_SUPPORTED    = 0x40F
1250 hidnplayr 32
 
2853 hidnplayr 33
; for system function 76
34
API_ETH         = 0 shl 16
35
API_IPv4        = 1 shl 16
36
API_ICMP        = 2 shl 16
37
API_UDP         = 3 shl 16
38
API_TCP         = 4 shl 16
39
API_ARP         = 5 shl 16
40
API_PPPOE       = 6 shl 16
41
 
1250 hidnplayr 42
struct sockaddr_in
2853 hidnplayr 43
        sin_family      dw      ?       ; sa_family_t
44
        sin_port        dw      ?       ; in_port_t
45
        sin_addr        dd      ?       ; struct in_addr
46
        sin_zero        rb      8       ; zero
1250 hidnplayr 47
ends
48
 
49
struct addrinfo
2853 hidnplayr 50
        ai_flags        dd      ?       ; bitmask of AI_*
51
        ai_family       dd      ?       ; PF_*
52
        ai_socktype     dd      ?       ; SOCK_*
53
        ai_protocol     dd      ?       ; 0 or IPPROTO_*
54
        ai_addrlen      dd      ?       ; length of ai_addr
55
        ai_canonname    dd      ?       ; char*
56
        ai_addr         dd      ?       ; struct sockaddr*
57
        ai_next         dd      ?       ; struct addrinfo*
1250 hidnplayr 58
ends
59
 
2853 hidnplayr 60
EAI_ADDRFAMILY  = 1
61
EAI_AGAIN       = 2
62
EAI_BADFLAGS    = 3
63
EAI_FAIL        = 4
64
EAI_FAMILY      = 5
65
EAI_MEMORY      = 6
66
EAI_NONAME      = 8
67
EAI_SERVICE     = 9
68
EAI_SOCKTYPE    = 10
69
EAI_BADHINTS    = 12
70
EAI_PROTOCOL    = 13
71
EAI_OVERFLOW    = 14
1250 hidnplayr 72
 
2853 hidnplayr 73
socket          fix 75, 0
74
close           fix 75, 1
75
bind            fix 75, 2
76
listen          fix 75, 3
77
connect         fix 75, 4
78
accept          fix 75, 5
79
send            fix 75, 6
80
recv            fix 75, 7
81
setsockopt      fix 75, 8
82
getsockopt      fix 75, 9
1250 hidnplayr 83
 
2853 hidnplayr 84
 
85
 
86
struct  ARP_entry
87
        IP      dd ?
88
        MAC     dp ?
89
        status  dw ?
90
        TTL     dw ?
91
ends