5 个解决方案
#1
呵呵,理论上可以,但是不会。好像有一个网络嗅探器,但是只能在本机运行
#2
试试Winsock控件
Winsock.LocalPort = 5060
Winsock.Listen
Winsock.LocalPort = 5060
Winsock.Listen
#3
回复人: sylz2000(尘土飞扬) ( ) 信誉:100 2005-04-22 09:10:00 得分: 0
试试Winsock控件
Winsock.LocalPort = 5060
Winsock.Listen
以上应该是行不通的,因为那个5060端口已经被bind了,使用winsock不行的。
想达到这个目的其实不难,用raw socket就可以了,只是声明太麻烦了,不过幸好偶有写好的声明,前段时间自己写了一个用来捕获数据包的东东,本来是用VC写的DLL,但是由于有一些是指针类型的参数,所以有数据丢失,后来好好看了看windows2000的网络编程资料,才发现用VB写也不是很难,我是在网吧上网,源码不在,以后再发上来了,也可以联系偶啊,提供技术支持!!!
MAIL:laidon1980@163.com QQ:71451437
试试Winsock控件
Winsock.LocalPort = 5060
Winsock.Listen
以上应该是行不通的,因为那个5060端口已经被bind了,使用winsock不行的。
想达到这个目的其实不难,用raw socket就可以了,只是声明太麻烦了,不过幸好偶有写好的声明,前段时间自己写了一个用来捕获数据包的东东,本来是用VC写的DLL,但是由于有一些是指针类型的参数,所以有数据丢失,后来好好看了看windows2000的网络编程资料,才发现用VB写也不是很难,我是在网吧上网,源码不在,以后再发上来了,也可以联系偶啊,提供技术支持!!!
MAIL:laidon1980@163.com QQ:71451437
#4
以下是数据类型的声明
Option Explicit
Global sockettype As Integer
Global Const FD_SETSIZE = 64
''
Global Const IOCPARM_MASK = &H7F
Global Const IOC_VOID = &H20000000
Global Const IOC_OUT = &H40000000
Global Const IOC_IN = &H80000000
Global Const IOC_INOUT = IOC_IN Or IOC_OUT
''
Global Const IPPROTO_IP = 0
Global Const IPPROTO_ICMP = 1
Global Const IPPROTO_GGP = 2
Global Const IPPROTO_TCP = 6
Global Const IPPROTO_PUP = 12
Global Const IPPROTO_UDP = 17
Global Const IPPROTO_IDP = 22
Global Const IPPROTO_ND = 77
Global Const IPPROTO_RAW = 255
Global Const IPPROTO_MAX = 256
'' Ports
Global Const IPPORT_ECHO = 7
Global Const IPPORT_DISCARD = 9
Global Const IPPORT_SYSTAT = 11
Global Const IPPORT_DAYTIME = 13
Global Const IPPORT_NETSTAT = 15
Global Const IPPORT_FTP = 21
Global Const IPPORT_TELNET = 23
Global Const IPPORT_SMTP = 25
Global Const IPPORT_TIMESERVER = 37
Global Const IPPORT_NAMESERVER = 42
Global Const IPPORT_WHOIS = 43
Global Const IPPORT_MTP = 57
'' Port/Socket numbers: Host specific functions
Option Explicit
Global sockettype As Integer
Global Const FD_SETSIZE = 64
''
Global Const IOCPARM_MASK = &H7F
Global Const IOC_VOID = &H20000000
Global Const IOC_OUT = &H40000000
Global Const IOC_IN = &H80000000
Global Const IOC_INOUT = IOC_IN Or IOC_OUT
''
Global Const IPPROTO_IP = 0
Global Const IPPROTO_ICMP = 1
Global Const IPPROTO_GGP = 2
Global Const IPPROTO_TCP = 6
Global Const IPPROTO_PUP = 12
Global Const IPPROTO_UDP = 17
Global Const IPPROTO_IDP = 22
Global Const IPPROTO_ND = 77
Global Const IPPROTO_RAW = 255
Global Const IPPROTO_MAX = 256
'' Ports
Global Const IPPORT_ECHO = 7
Global Const IPPORT_DISCARD = 9
Global Const IPPORT_SYSTAT = 11
Global Const IPPORT_DAYTIME = 13
Global Const IPPORT_NETSTAT = 15
Global Const IPPORT_FTP = 21
Global Const IPPORT_TELNET = 23
Global Const IPPORT_SMTP = 25
Global Const IPPORT_TIMESERVER = 37
Global Const IPPORT_NAMESERVER = 42
Global Const IPPORT_WHOIS = 43
Global Const IPPORT_MTP = 57
'' Port/Socket numbers: Host specific functions
#5
Global Const IPPORT_TFTP = 69
Global Const IPPORT_RJE = 77
Global Const IPPORT_FINGER = 79
Global Const IPPORT_HTTP = 80
Global Const IPPORT_TTYLINK = 87
Global Const IPPORT_SUPDUP = 95
'' Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root)
Global Const IPPORT_RESERVED = 1024
' Link Numbers
Global Const IMPLINK_IP = 155
Global Const IMPLINK_LOWEXPER = 156
Global Const IMPLINK_HIGHEXPER = 158
Global Const IN_CLASSA_NET = &HFF000000 ' 0xff000000
Global Const IN_CLASSA_NSHIFT = 24
Global Const IN_CLASSA_HOST = &HFFFFFF ' 0x00ffffff
Global Const IN_CLASSA_MAX = 128
Global Const IN_CLASSB_NET = &HFFFF0000 ' 0xffff0000
Global Const IN_CLASSB_NSHIFT = 16
Global Const IN_CLASSB_HOST = &HFFFF ' 0x0000ffff
Global Const IN_CLASSB_MAX = 65536
Global Const IN_CLASSC_NET = &HFFFFFF00 ' 0xffffff00
Global Const IN_CLASSC_NSHIFT = 8
Global Const IN_CLASSC_HOST = &HFF ' 0x000000ff
Global Const INADDR_ANY = &H0
Global Const INADDR_LOOPBACK = &H7F000001 ' 0x7f000001
Global Const INADDR_BROADCAST = &HFFFFFFFF
Global Const INADDR_NONE = &HFFFFFFFF
''
Global Const WSADESCRIPTION_LEN = 256
Global Const WSASYS_STATUS_LEN = 128
'' Options for use with [gs]etsockopt at the IP level
Global Const IP_OPTIONS = 1
'' Types
Global Const SOCK_STREAM = 1
Global Const SOCK_DGRAM = 2
Global Const SOCK_RAW = 3
Global Const SOCK_RDM = 4
Global Const SOCK_SEQPACKET = 5
'' Option flags per-socket
Global Const SO_DEBUG = &H1 ' 0x0001 turn on debugging info recording
Global Const SO_ACCEPTCONN = &H2 ' 0x0002 socket has had listen()
Global Const SO_REUSEADDR = &H4 ' 0x0004 allow local address reuse
Global Const SO_KEEPALIVE = &H8 ' 0x0008 keep connections alive
Global Const SO_DONTROUTE = &H10 ' 0x0010 just use interface addresses
Global Const SO_BROADCAST = &H20 ' 0x0020 permit sending of broadcast messages
Global Const SO_USELOOPBACK = &H40 ' 0x0040 bypass hardware when possible
Global Const SO_LINGER = &H80 ' 0x0080 linger on close if data present
Global Const SO_OOBINLINE = &H100 ' 0x0100 leave received OOB data in line
Global Const SO_DONTLINGER = Not SO_LINGER
'' Additional options
Global Const SO_SNDBUF = &H1001 ' 0x1001 send buffer size
Global Const SO_RCVBUF = &H1002 ' 0z1002 receive buffer size
Global Const SO_SNDLOWAT = &H1003 ' 0x1003 send low-water mark
Global Const SO_RCVLOWAT = &H1004 ' 0x1004 receive low-water mark
Global Const SO_SNDTIMEO = &H1005 ' 0x1005 send timeout
Global Const SO_RCVTIMEO = &H1006 ' 0x1006 receive timeout
Global Const SO_ERROR = &H1007 ' 0x1007 get error status and clear
Global Const SO_TYPE = &H1008 ' 0x1008 get socket type
'' TCP options
Global Const TCP_NODELAY = &H1 ' 0x0001
'' Address families
Global Const AF_UNSPEC = 0 ' unspecified
Global Const AF_UNIX = 1 ' local to host (pipes, portals)
Global Const AF_INET = 2 ' internetworks: UDP, TCP, etc.
Global Const AF_IMPLINK = 3 ' arpanet imp addresses
Global Const AF_PUP = 4 ' pup protocols: e.g. BSP
Global Const AF_CHAOS = 5 ' mit CHAOS protocols
Global Const AF_NS = 6 ' XEROX NS protocols
Global Const AF_ISO = 7 ' ISO protocols
Global Const AF_OSI = 7 ' OSI is ISO
Global Const AF_ECMA = 8 ' european computer manufacturers
Global Const AF_DATAKIT = 9 ' datakit protocols
Global Const AF_CCITT = 10 ' CCITT protocols, X.25 cte
Global Const AF_SNA = 11 ' IBM SNA
Global Const AF_DECNET = 12 ' DECnet
Global Const AF_DLI = 13 ' Direct data link interface
Global Const AF_LAT = 14 ' LAT
Global Const AF_HYLINK = 15 ' NSC Hyperchannel
Global Const AF_APPLETALK = 16 ' AppleTalk
Global Const AF_NETBIOS = 17 ' NetBios style addresses
Global Const AF_MAX = 18
'' Protocol families, same as address families for now
Global Const PF_UNSPEC = 0 ' unspecified
Global Const PF_UNIX = 1 ' local to host (pipes, portals)
Global Const PF_INET = 2 ' internetworks: UDP, TCP, etc.
Global Const PF_IMPLINK = 3 ' arpanet imp addresses
Global Const PF_PUP = 4 ' pup protocols: e.g. BSP
Global Const PF_CHAOS = 5 ' mit CHAOS protocols
Global Const PF_NS = 6 ' XEROX NS protocols
Global Const PF_ISO = 7 ' ISO protocols
Global Const PF_OSI = 7 ' OSI is ISO
Global Const PF_ECMA = 8 ' european computer manufacturers
Global Const PF_DATAKIT = 9 ' datakit protocols
Global Const PF_CCITT = 10 ' CCITT protocols, X.25 cte
Global Const PF_SNA = 11 ' IBM SNA
Global Const PF_DECNET = 12 ' DECnet
Global Const PF_DLI = 13 ' Direct data link interface
Global Const PF_LAT = 14 ' LAT
Global Const PF_HYLINK = 15 ' NSC Hyperchannel
Global Const PF_APPLETALK = 16 ' AppleTalk
Global Const PF_NETBIOS = 17 ' NetBios style addresses
Global Const PF_MAX = 18
'' Level number for [get/set]sockopt() to apply to socket itself
Global Const SOL_SOCKET = &HFFFF ' 0xffff options for socket level
'' Maximum que length specifiable by listen()
Global Const SOMAXCONN = 5
Global Const IPPORT_RJE = 77
Global Const IPPORT_FINGER = 79
Global Const IPPORT_HTTP = 80
Global Const IPPORT_TTYLINK = 87
Global Const IPPORT_SUPDUP = 95
'' Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root)
Global Const IPPORT_RESERVED = 1024
' Link Numbers
Global Const IMPLINK_IP = 155
Global Const IMPLINK_LOWEXPER = 156
Global Const IMPLINK_HIGHEXPER = 158
Global Const IN_CLASSA_NET = &HFF000000 ' 0xff000000
Global Const IN_CLASSA_NSHIFT = 24
Global Const IN_CLASSA_HOST = &HFFFFFF ' 0x00ffffff
Global Const IN_CLASSA_MAX = 128
Global Const IN_CLASSB_NET = &HFFFF0000 ' 0xffff0000
Global Const IN_CLASSB_NSHIFT = 16
Global Const IN_CLASSB_HOST = &HFFFF ' 0x0000ffff
Global Const IN_CLASSB_MAX = 65536
Global Const IN_CLASSC_NET = &HFFFFFF00 ' 0xffffff00
Global Const IN_CLASSC_NSHIFT = 8
Global Const IN_CLASSC_HOST = &HFF ' 0x000000ff
Global Const INADDR_ANY = &H0
Global Const INADDR_LOOPBACK = &H7F000001 ' 0x7f000001
Global Const INADDR_BROADCAST = &HFFFFFFFF
Global Const INADDR_NONE = &HFFFFFFFF
''
Global Const WSADESCRIPTION_LEN = 256
Global Const WSASYS_STATUS_LEN = 128
'' Options for use with [gs]etsockopt at the IP level
Global Const IP_OPTIONS = 1
'' Types
Global Const SOCK_STREAM = 1
Global Const SOCK_DGRAM = 2
Global Const SOCK_RAW = 3
Global Const SOCK_RDM = 4
Global Const SOCK_SEQPACKET = 5
'' Option flags per-socket
Global Const SO_DEBUG = &H1 ' 0x0001 turn on debugging info recording
Global Const SO_ACCEPTCONN = &H2 ' 0x0002 socket has had listen()
Global Const SO_REUSEADDR = &H4 ' 0x0004 allow local address reuse
Global Const SO_KEEPALIVE = &H8 ' 0x0008 keep connections alive
Global Const SO_DONTROUTE = &H10 ' 0x0010 just use interface addresses
Global Const SO_BROADCAST = &H20 ' 0x0020 permit sending of broadcast messages
Global Const SO_USELOOPBACK = &H40 ' 0x0040 bypass hardware when possible
Global Const SO_LINGER = &H80 ' 0x0080 linger on close if data present
Global Const SO_OOBINLINE = &H100 ' 0x0100 leave received OOB data in line
Global Const SO_DONTLINGER = Not SO_LINGER
'' Additional options
Global Const SO_SNDBUF = &H1001 ' 0x1001 send buffer size
Global Const SO_RCVBUF = &H1002 ' 0z1002 receive buffer size
Global Const SO_SNDLOWAT = &H1003 ' 0x1003 send low-water mark
Global Const SO_RCVLOWAT = &H1004 ' 0x1004 receive low-water mark
Global Const SO_SNDTIMEO = &H1005 ' 0x1005 send timeout
Global Const SO_RCVTIMEO = &H1006 ' 0x1006 receive timeout
Global Const SO_ERROR = &H1007 ' 0x1007 get error status and clear
Global Const SO_TYPE = &H1008 ' 0x1008 get socket type
'' TCP options
Global Const TCP_NODELAY = &H1 ' 0x0001
'' Address families
Global Const AF_UNSPEC = 0 ' unspecified
Global Const AF_UNIX = 1 ' local to host (pipes, portals)
Global Const AF_INET = 2 ' internetworks: UDP, TCP, etc.
Global Const AF_IMPLINK = 3 ' arpanet imp addresses
Global Const AF_PUP = 4 ' pup protocols: e.g. BSP
Global Const AF_CHAOS = 5 ' mit CHAOS protocols
Global Const AF_NS = 6 ' XEROX NS protocols
Global Const AF_ISO = 7 ' ISO protocols
Global Const AF_OSI = 7 ' OSI is ISO
Global Const AF_ECMA = 8 ' european computer manufacturers
Global Const AF_DATAKIT = 9 ' datakit protocols
Global Const AF_CCITT = 10 ' CCITT protocols, X.25 cte
Global Const AF_SNA = 11 ' IBM SNA
Global Const AF_DECNET = 12 ' DECnet
Global Const AF_DLI = 13 ' Direct data link interface
Global Const AF_LAT = 14 ' LAT
Global Const AF_HYLINK = 15 ' NSC Hyperchannel
Global Const AF_APPLETALK = 16 ' AppleTalk
Global Const AF_NETBIOS = 17 ' NetBios style addresses
Global Const AF_MAX = 18
'' Protocol families, same as address families for now
Global Const PF_UNSPEC = 0 ' unspecified
Global Const PF_UNIX = 1 ' local to host (pipes, portals)
Global Const PF_INET = 2 ' internetworks: UDP, TCP, etc.
Global Const PF_IMPLINK = 3 ' arpanet imp addresses
Global Const PF_PUP = 4 ' pup protocols: e.g. BSP
Global Const PF_CHAOS = 5 ' mit CHAOS protocols
Global Const PF_NS = 6 ' XEROX NS protocols
Global Const PF_ISO = 7 ' ISO protocols
Global Const PF_OSI = 7 ' OSI is ISO
Global Const PF_ECMA = 8 ' european computer manufacturers
Global Const PF_DATAKIT = 9 ' datakit protocols
Global Const PF_CCITT = 10 ' CCITT protocols, X.25 cte
Global Const PF_SNA = 11 ' IBM SNA
Global Const PF_DECNET = 12 ' DECnet
Global Const PF_DLI = 13 ' Direct data link interface
Global Const PF_LAT = 14 ' LAT
Global Const PF_HYLINK = 15 ' NSC Hyperchannel
Global Const PF_APPLETALK = 16 ' AppleTalk
Global Const PF_NETBIOS = 17 ' NetBios style addresses
Global Const PF_MAX = 18
'' Level number for [get/set]sockopt() to apply to socket itself
Global Const SOL_SOCKET = &HFFFF ' 0xffff options for socket level
'' Maximum que length specifiable by listen()
Global Const SOMAXCONN = 5
#1
呵呵,理论上可以,但是不会。好像有一个网络嗅探器,但是只能在本机运行
#2
试试Winsock控件
Winsock.LocalPort = 5060
Winsock.Listen
Winsock.LocalPort = 5060
Winsock.Listen
#3
回复人: sylz2000(尘土飞扬) ( ) 信誉:100 2005-04-22 09:10:00 得分: 0
试试Winsock控件
Winsock.LocalPort = 5060
Winsock.Listen
以上应该是行不通的,因为那个5060端口已经被bind了,使用winsock不行的。
想达到这个目的其实不难,用raw socket就可以了,只是声明太麻烦了,不过幸好偶有写好的声明,前段时间自己写了一个用来捕获数据包的东东,本来是用VC写的DLL,但是由于有一些是指针类型的参数,所以有数据丢失,后来好好看了看windows2000的网络编程资料,才发现用VB写也不是很难,我是在网吧上网,源码不在,以后再发上来了,也可以联系偶啊,提供技术支持!!!
MAIL:laidon1980@163.com QQ:71451437
试试Winsock控件
Winsock.LocalPort = 5060
Winsock.Listen
以上应该是行不通的,因为那个5060端口已经被bind了,使用winsock不行的。
想达到这个目的其实不难,用raw socket就可以了,只是声明太麻烦了,不过幸好偶有写好的声明,前段时间自己写了一个用来捕获数据包的东东,本来是用VC写的DLL,但是由于有一些是指针类型的参数,所以有数据丢失,后来好好看了看windows2000的网络编程资料,才发现用VB写也不是很难,我是在网吧上网,源码不在,以后再发上来了,也可以联系偶啊,提供技术支持!!!
MAIL:laidon1980@163.com QQ:71451437
#4
以下是数据类型的声明
Option Explicit
Global sockettype As Integer
Global Const FD_SETSIZE = 64
''
Global Const IOCPARM_MASK = &H7F
Global Const IOC_VOID = &H20000000
Global Const IOC_OUT = &H40000000
Global Const IOC_IN = &H80000000
Global Const IOC_INOUT = IOC_IN Or IOC_OUT
''
Global Const IPPROTO_IP = 0
Global Const IPPROTO_ICMP = 1
Global Const IPPROTO_GGP = 2
Global Const IPPROTO_TCP = 6
Global Const IPPROTO_PUP = 12
Global Const IPPROTO_UDP = 17
Global Const IPPROTO_IDP = 22
Global Const IPPROTO_ND = 77
Global Const IPPROTO_RAW = 255
Global Const IPPROTO_MAX = 256
'' Ports
Global Const IPPORT_ECHO = 7
Global Const IPPORT_DISCARD = 9
Global Const IPPORT_SYSTAT = 11
Global Const IPPORT_DAYTIME = 13
Global Const IPPORT_NETSTAT = 15
Global Const IPPORT_FTP = 21
Global Const IPPORT_TELNET = 23
Global Const IPPORT_SMTP = 25
Global Const IPPORT_TIMESERVER = 37
Global Const IPPORT_NAMESERVER = 42
Global Const IPPORT_WHOIS = 43
Global Const IPPORT_MTP = 57
'' Port/Socket numbers: Host specific functions
Option Explicit
Global sockettype As Integer
Global Const FD_SETSIZE = 64
''
Global Const IOCPARM_MASK = &H7F
Global Const IOC_VOID = &H20000000
Global Const IOC_OUT = &H40000000
Global Const IOC_IN = &H80000000
Global Const IOC_INOUT = IOC_IN Or IOC_OUT
''
Global Const IPPROTO_IP = 0
Global Const IPPROTO_ICMP = 1
Global Const IPPROTO_GGP = 2
Global Const IPPROTO_TCP = 6
Global Const IPPROTO_PUP = 12
Global Const IPPROTO_UDP = 17
Global Const IPPROTO_IDP = 22
Global Const IPPROTO_ND = 77
Global Const IPPROTO_RAW = 255
Global Const IPPROTO_MAX = 256
'' Ports
Global Const IPPORT_ECHO = 7
Global Const IPPORT_DISCARD = 9
Global Const IPPORT_SYSTAT = 11
Global Const IPPORT_DAYTIME = 13
Global Const IPPORT_NETSTAT = 15
Global Const IPPORT_FTP = 21
Global Const IPPORT_TELNET = 23
Global Const IPPORT_SMTP = 25
Global Const IPPORT_TIMESERVER = 37
Global Const IPPORT_NAMESERVER = 42
Global Const IPPORT_WHOIS = 43
Global Const IPPORT_MTP = 57
'' Port/Socket numbers: Host specific functions
#5
Global Const IPPORT_TFTP = 69
Global Const IPPORT_RJE = 77
Global Const IPPORT_FINGER = 79
Global Const IPPORT_HTTP = 80
Global Const IPPORT_TTYLINK = 87
Global Const IPPORT_SUPDUP = 95
'' Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root)
Global Const IPPORT_RESERVED = 1024
' Link Numbers
Global Const IMPLINK_IP = 155
Global Const IMPLINK_LOWEXPER = 156
Global Const IMPLINK_HIGHEXPER = 158
Global Const IN_CLASSA_NET = &HFF000000 ' 0xff000000
Global Const IN_CLASSA_NSHIFT = 24
Global Const IN_CLASSA_HOST = &HFFFFFF ' 0x00ffffff
Global Const IN_CLASSA_MAX = 128
Global Const IN_CLASSB_NET = &HFFFF0000 ' 0xffff0000
Global Const IN_CLASSB_NSHIFT = 16
Global Const IN_CLASSB_HOST = &HFFFF ' 0x0000ffff
Global Const IN_CLASSB_MAX = 65536
Global Const IN_CLASSC_NET = &HFFFFFF00 ' 0xffffff00
Global Const IN_CLASSC_NSHIFT = 8
Global Const IN_CLASSC_HOST = &HFF ' 0x000000ff
Global Const INADDR_ANY = &H0
Global Const INADDR_LOOPBACK = &H7F000001 ' 0x7f000001
Global Const INADDR_BROADCAST = &HFFFFFFFF
Global Const INADDR_NONE = &HFFFFFFFF
''
Global Const WSADESCRIPTION_LEN = 256
Global Const WSASYS_STATUS_LEN = 128
'' Options for use with [gs]etsockopt at the IP level
Global Const IP_OPTIONS = 1
'' Types
Global Const SOCK_STREAM = 1
Global Const SOCK_DGRAM = 2
Global Const SOCK_RAW = 3
Global Const SOCK_RDM = 4
Global Const SOCK_SEQPACKET = 5
'' Option flags per-socket
Global Const SO_DEBUG = &H1 ' 0x0001 turn on debugging info recording
Global Const SO_ACCEPTCONN = &H2 ' 0x0002 socket has had listen()
Global Const SO_REUSEADDR = &H4 ' 0x0004 allow local address reuse
Global Const SO_KEEPALIVE = &H8 ' 0x0008 keep connections alive
Global Const SO_DONTROUTE = &H10 ' 0x0010 just use interface addresses
Global Const SO_BROADCAST = &H20 ' 0x0020 permit sending of broadcast messages
Global Const SO_USELOOPBACK = &H40 ' 0x0040 bypass hardware when possible
Global Const SO_LINGER = &H80 ' 0x0080 linger on close if data present
Global Const SO_OOBINLINE = &H100 ' 0x0100 leave received OOB data in line
Global Const SO_DONTLINGER = Not SO_LINGER
'' Additional options
Global Const SO_SNDBUF = &H1001 ' 0x1001 send buffer size
Global Const SO_RCVBUF = &H1002 ' 0z1002 receive buffer size
Global Const SO_SNDLOWAT = &H1003 ' 0x1003 send low-water mark
Global Const SO_RCVLOWAT = &H1004 ' 0x1004 receive low-water mark
Global Const SO_SNDTIMEO = &H1005 ' 0x1005 send timeout
Global Const SO_RCVTIMEO = &H1006 ' 0x1006 receive timeout
Global Const SO_ERROR = &H1007 ' 0x1007 get error status and clear
Global Const SO_TYPE = &H1008 ' 0x1008 get socket type
'' TCP options
Global Const TCP_NODELAY = &H1 ' 0x0001
'' Address families
Global Const AF_UNSPEC = 0 ' unspecified
Global Const AF_UNIX = 1 ' local to host (pipes, portals)
Global Const AF_INET = 2 ' internetworks: UDP, TCP, etc.
Global Const AF_IMPLINK = 3 ' arpanet imp addresses
Global Const AF_PUP = 4 ' pup protocols: e.g. BSP
Global Const AF_CHAOS = 5 ' mit CHAOS protocols
Global Const AF_NS = 6 ' XEROX NS protocols
Global Const AF_ISO = 7 ' ISO protocols
Global Const AF_OSI = 7 ' OSI is ISO
Global Const AF_ECMA = 8 ' european computer manufacturers
Global Const AF_DATAKIT = 9 ' datakit protocols
Global Const AF_CCITT = 10 ' CCITT protocols, X.25 cte
Global Const AF_SNA = 11 ' IBM SNA
Global Const AF_DECNET = 12 ' DECnet
Global Const AF_DLI = 13 ' Direct data link interface
Global Const AF_LAT = 14 ' LAT
Global Const AF_HYLINK = 15 ' NSC Hyperchannel
Global Const AF_APPLETALK = 16 ' AppleTalk
Global Const AF_NETBIOS = 17 ' NetBios style addresses
Global Const AF_MAX = 18
'' Protocol families, same as address families for now
Global Const PF_UNSPEC = 0 ' unspecified
Global Const PF_UNIX = 1 ' local to host (pipes, portals)
Global Const PF_INET = 2 ' internetworks: UDP, TCP, etc.
Global Const PF_IMPLINK = 3 ' arpanet imp addresses
Global Const PF_PUP = 4 ' pup protocols: e.g. BSP
Global Const PF_CHAOS = 5 ' mit CHAOS protocols
Global Const PF_NS = 6 ' XEROX NS protocols
Global Const PF_ISO = 7 ' ISO protocols
Global Const PF_OSI = 7 ' OSI is ISO
Global Const PF_ECMA = 8 ' european computer manufacturers
Global Const PF_DATAKIT = 9 ' datakit protocols
Global Const PF_CCITT = 10 ' CCITT protocols, X.25 cte
Global Const PF_SNA = 11 ' IBM SNA
Global Const PF_DECNET = 12 ' DECnet
Global Const PF_DLI = 13 ' Direct data link interface
Global Const PF_LAT = 14 ' LAT
Global Const PF_HYLINK = 15 ' NSC Hyperchannel
Global Const PF_APPLETALK = 16 ' AppleTalk
Global Const PF_NETBIOS = 17 ' NetBios style addresses
Global Const PF_MAX = 18
'' Level number for [get/set]sockopt() to apply to socket itself
Global Const SOL_SOCKET = &HFFFF ' 0xffff options for socket level
'' Maximum que length specifiable by listen()
Global Const SOMAXCONN = 5
Global Const IPPORT_RJE = 77
Global Const IPPORT_FINGER = 79
Global Const IPPORT_HTTP = 80
Global Const IPPORT_TTYLINK = 87
Global Const IPPORT_SUPDUP = 95
'' Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root)
Global Const IPPORT_RESERVED = 1024
' Link Numbers
Global Const IMPLINK_IP = 155
Global Const IMPLINK_LOWEXPER = 156
Global Const IMPLINK_HIGHEXPER = 158
Global Const IN_CLASSA_NET = &HFF000000 ' 0xff000000
Global Const IN_CLASSA_NSHIFT = 24
Global Const IN_CLASSA_HOST = &HFFFFFF ' 0x00ffffff
Global Const IN_CLASSA_MAX = 128
Global Const IN_CLASSB_NET = &HFFFF0000 ' 0xffff0000
Global Const IN_CLASSB_NSHIFT = 16
Global Const IN_CLASSB_HOST = &HFFFF ' 0x0000ffff
Global Const IN_CLASSB_MAX = 65536
Global Const IN_CLASSC_NET = &HFFFFFF00 ' 0xffffff00
Global Const IN_CLASSC_NSHIFT = 8
Global Const IN_CLASSC_HOST = &HFF ' 0x000000ff
Global Const INADDR_ANY = &H0
Global Const INADDR_LOOPBACK = &H7F000001 ' 0x7f000001
Global Const INADDR_BROADCAST = &HFFFFFFFF
Global Const INADDR_NONE = &HFFFFFFFF
''
Global Const WSADESCRIPTION_LEN = 256
Global Const WSASYS_STATUS_LEN = 128
'' Options for use with [gs]etsockopt at the IP level
Global Const IP_OPTIONS = 1
'' Types
Global Const SOCK_STREAM = 1
Global Const SOCK_DGRAM = 2
Global Const SOCK_RAW = 3
Global Const SOCK_RDM = 4
Global Const SOCK_SEQPACKET = 5
'' Option flags per-socket
Global Const SO_DEBUG = &H1 ' 0x0001 turn on debugging info recording
Global Const SO_ACCEPTCONN = &H2 ' 0x0002 socket has had listen()
Global Const SO_REUSEADDR = &H4 ' 0x0004 allow local address reuse
Global Const SO_KEEPALIVE = &H8 ' 0x0008 keep connections alive
Global Const SO_DONTROUTE = &H10 ' 0x0010 just use interface addresses
Global Const SO_BROADCAST = &H20 ' 0x0020 permit sending of broadcast messages
Global Const SO_USELOOPBACK = &H40 ' 0x0040 bypass hardware when possible
Global Const SO_LINGER = &H80 ' 0x0080 linger on close if data present
Global Const SO_OOBINLINE = &H100 ' 0x0100 leave received OOB data in line
Global Const SO_DONTLINGER = Not SO_LINGER
'' Additional options
Global Const SO_SNDBUF = &H1001 ' 0x1001 send buffer size
Global Const SO_RCVBUF = &H1002 ' 0z1002 receive buffer size
Global Const SO_SNDLOWAT = &H1003 ' 0x1003 send low-water mark
Global Const SO_RCVLOWAT = &H1004 ' 0x1004 receive low-water mark
Global Const SO_SNDTIMEO = &H1005 ' 0x1005 send timeout
Global Const SO_RCVTIMEO = &H1006 ' 0x1006 receive timeout
Global Const SO_ERROR = &H1007 ' 0x1007 get error status and clear
Global Const SO_TYPE = &H1008 ' 0x1008 get socket type
'' TCP options
Global Const TCP_NODELAY = &H1 ' 0x0001
'' Address families
Global Const AF_UNSPEC = 0 ' unspecified
Global Const AF_UNIX = 1 ' local to host (pipes, portals)
Global Const AF_INET = 2 ' internetworks: UDP, TCP, etc.
Global Const AF_IMPLINK = 3 ' arpanet imp addresses
Global Const AF_PUP = 4 ' pup protocols: e.g. BSP
Global Const AF_CHAOS = 5 ' mit CHAOS protocols
Global Const AF_NS = 6 ' XEROX NS protocols
Global Const AF_ISO = 7 ' ISO protocols
Global Const AF_OSI = 7 ' OSI is ISO
Global Const AF_ECMA = 8 ' european computer manufacturers
Global Const AF_DATAKIT = 9 ' datakit protocols
Global Const AF_CCITT = 10 ' CCITT protocols, X.25 cte
Global Const AF_SNA = 11 ' IBM SNA
Global Const AF_DECNET = 12 ' DECnet
Global Const AF_DLI = 13 ' Direct data link interface
Global Const AF_LAT = 14 ' LAT
Global Const AF_HYLINK = 15 ' NSC Hyperchannel
Global Const AF_APPLETALK = 16 ' AppleTalk
Global Const AF_NETBIOS = 17 ' NetBios style addresses
Global Const AF_MAX = 18
'' Protocol families, same as address families for now
Global Const PF_UNSPEC = 0 ' unspecified
Global Const PF_UNIX = 1 ' local to host (pipes, portals)
Global Const PF_INET = 2 ' internetworks: UDP, TCP, etc.
Global Const PF_IMPLINK = 3 ' arpanet imp addresses
Global Const PF_PUP = 4 ' pup protocols: e.g. BSP
Global Const PF_CHAOS = 5 ' mit CHAOS protocols
Global Const PF_NS = 6 ' XEROX NS protocols
Global Const PF_ISO = 7 ' ISO protocols
Global Const PF_OSI = 7 ' OSI is ISO
Global Const PF_ECMA = 8 ' european computer manufacturers
Global Const PF_DATAKIT = 9 ' datakit protocols
Global Const PF_CCITT = 10 ' CCITT protocols, X.25 cte
Global Const PF_SNA = 11 ' IBM SNA
Global Const PF_DECNET = 12 ' DECnet
Global Const PF_DLI = 13 ' Direct data link interface
Global Const PF_LAT = 14 ' LAT
Global Const PF_HYLINK = 15 ' NSC Hyperchannel
Global Const PF_APPLETALK = 16 ' AppleTalk
Global Const PF_NETBIOS = 17 ' NetBios style addresses
Global Const PF_MAX = 18
'' Level number for [get/set]sockopt() to apply to socket itself
Global Const SOL_SOCKET = &HFFFF ' 0xffff options for socket level
'' Maximum que length specifiable by listen()
Global Const SOMAXCONN = 5