Subversion Repositories Spectranet

[/] [branches/] [gnubinutils/] [include/] [sockdefs.inc] - Blame information for rev 386

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 386 winston
;The MIT License
2
;
3
;Copyright (c) 2008 Dylan Smith
4
;
5
;Permission is hereby granted, free of charge, to any person obtaining a copy
6
;of this software and associated documentation files (the "Software"), to deal
7
;in the Software without restriction, including without limitation the rights
8
;to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
;copies of the Software, and to permit persons to whom the Software is
10
;furnished to do so, subject to the following conditions:
11
;
12
;The above copyright notice and this permission notice shall be included in
13
;all copies or substantial portions of the Software.
14
;
15
;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
;IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
;FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
;AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
;LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
;OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
;THE SOFTWARE.
22
 
23
; General definitions. These are not hardware specific (generally).
24
 
25
; File descriptor flags.
26
FD_CLOSED       equ 0x80
27
CLOSEDBIT       equ 7
28
FD_VIRTUAL      equ 0x40
29
VIRTBIT         equ 6
30
FD_VFS          equ 0x20        ; for file descriptors that are valid
31
VFSBIT          equ 5           ; but are not sockets
32
NOTSOCKMASK     equ 0xE0        ; all hw sockets must be < 0x1F
33
SOCKMASK        equ 0x1F
34
 
35
; Error return codes - base socket library
36
EBUGGERED       equ 0xFF
37
ESNFILE         equ 0xFE        ; TODO: Rationalize these and make
38
ESBADF          equ 0xFD        ; compatible with filesystem
39
ECONNRESET      equ 0xFC
40
ETIMEDOUT       equ 0xFB
41
ECONNREFUSED    equ 0xFA
42
 
43
; Error return codes - DNS
44
HOST_NOT_FOUND  equ 0xEF
45
NO_RECOVERY     equ 0xEE
46
NO_ADDRESS      equ 0xED
47
DNS_TIMEOUT     equ 0xEC
48
 
49
; Socket types
50
SOCK_STREAM     equ 0x01
51
SOCK_DGRAM      equ 0x02
52
SOCK_RAW        equ 0x03
53