emailler/client/inc/nb65_constants.i

84 lines
5.5 KiB
OpenEdge ABL
Raw Normal View History

.ifndef NB65_API_VERSION_NUMBER
NB65_API_VERSION_NUMBER=$01
NB65_CART_SIGNATURE = $8009
NB65_API_VERSION = $800d
NB65_BANKSWITCH_SUPPORT = $800e
NB65_DISPATCH_VECTOR = $800f
NB65_PERIODIC_PROCESSING_VECTOR = $8012
NB65_VBL_VECTOR = $8015
NB65_RAM_STUB_SIGNATURE = $C000
NB65_RAM_STUB_ACTIVATE = $C004
;function numbers
;to make a function call:
; Y = function number
; AX = pointer to parameter buffer (for functions that take parameters)
; then JSR NB65_DISPATCH_VECTOR
; on return, carry flag is set if there is an error, or clear otherwise
; some functions return results in AX directly, others will update the parameter buffer they were called with.
; any register not specified in outputs will have an undefined value on exit
NB65_INITIALIZE =$01 ;no inputs or outputs - initializes IP stack, also sets IRQ chain to call NB65_VBL_VECTOR at @ 60hz
NB65_GET_IP_CONFIG =$02 ;no inputs, outputs AX=pointer to IP configuration structure
NB65_TFTP_DIRECTORY_LISTING =$03 ;inputs: AX points to a TFTP parameter structure, outputs: none
NB65_TFTP_DOWNLOAD =$04 ;inputs: AX points to a TFTP parameter structure, outputs: TFTP param structure updated with
;NB65_TFTP_POINTER updated to reflect actual load address (if load address $0000 originally passed in)
NB65_DNS_RESOLVE =$05 ;inputs: AX points to a DNS parameter structure, outputs: DNS param structure updated with
;NB65_DNS_HOSTNAME_IP updated with IP address corresponding to hostname.
NB65_UDP_ADD_LISTENER =$06 ;inputs: AX points to a UDP listener parameter structure, outputs: none
NB65_GET_INPUT_PACKET_INFO =$07 ;inputs: AX points to a UDP packet parameter structure, outputs: UDP packet structure filled in
NB65_SEND_UDP_PACKET =$08 ;inputs: AX points to a UDP packet parameter structure, outputs: none packet is sent
NB65_DEACTIVATE =$09 ;inputs: none, outputs: none (removes call to NB65_VBL_VECTOR on IRQ chain)
NB65_PRINT_ASCIIZ =$80 ;inputs: AX= pointer to null terminated string to be printed to screen, outputs: none
NB65_PRINT_HEX =$81 ;inputs: A = byte digit to be displayed on screen as (zero padded) hex digit, outputs: none
NB65_PRINT_DOTTED_QUAD =$82 ;inputs: AX= pointer to 4 bytes that will be displayed as a decimal dotted quad (e.g. 192.168.1.1)
NB65_PRINT_IP_CONFIG =$83 ;no inputs, no outputs, prints to screen current IP configuration
NB65_GET_LAST_ERROR =$FF ;no inputs, outputs A = error code (from last function that set the global error value, not necessarily the
;last function that was called)
;offsets in IP configuration structure (used by NB65_GET_IP_CONFIG)
NB65_CFG_MAC = $00 ;6 byte MAC address
NB65_CFG_IP = $06 ;4 byte local IP address (will be overwritten by DHCP)
NB65_CFG_NETMASK = $0A ;4 byte local netmask (will be overwritten by DHCP)
NB65_CFG_GATEWAY = $0D ;4 byte local gateway (will be overwritten by DHCP)
NB65_CFG_DNS_SERVER = $12 ;4 byte IP address of DNS server (will be overwritten by DHCP)
NB65_CFG_DHCP_SERVER = $16 ;4 byte IP address of DHCP server (will only be set by DHCP initialisation)
NB65_DRIVER_NAME = $1A ;2 byte pointer to name of driver
;offsets in TFTP parameter structure (used by NB65_TFTP_DIRECTORY_LISTING & NB65_TFTP_DOWNLOAD)
NB65_TFTP_IP = $00 ;4 byte IP address of TFTP server
NB65_TFTP_FILENAME = $04 ;2 byte pointer to asciiz filename (or filemask in case of NB65_TFTP_DIRECTORY_LISTING)
NB65_TFTP_POINTER = $06 ;2 byte pointer to memory location data to be stored in
;offsets in DNS parameter structure (used by NB65_DNS_RESOLVE)
NB65_DNS_HOSTNAME = $00 ;2 byte pointer to asciiz hostname to resolve (can also be a dotted quad string)
NB65_DNS_HOSTNAME_IP= $00 ;4 byte IP address (filled in on succesful resolution of hostname)
;offsets in UDP listener parameter structure
NB65_UDP_LISTENER_PORT = $00 ;2 byte port number
NB65_UDP_LISTENER_CALLBACK = $02 ;2 byte address of routine to call when UDP packet arrives for specified port
;offsets in UDP packet parameter structure
NB65_REMOTE_IP = $00 ;4 byte IP address of remote machine (src of inbound packets, dest of outbound packets)
NB65_REMOTE_PORT = $04 ;2 byte port number of remote machine (src of inbound packets, dest of outbound packets)
NB65_LOCAL_PORT = $06 ;2 byte port number of local machine (src of outbound packets, dest of inbound packets)
NB65_PAYLOAD_LENGTH = $08 ;2 byte length of payload of packet (after all ethernet,IP,UDP headers)
NB65_PAYLOAD_POINTER =$0A ;2 byte pointer to payload of packet (after all headers)
;error codes (as returned by NB65_GET_LAST_ERROR)
NB65_ERROR_PORT_IN_USE = $80
NB65_ERROR_TIMEOUT_ON_RECEIVE = $81
NB65_ERROR_TRANSMIT_FAILED = $82
NB65_ERROR_TRANSMISSION_REJECTED_BY_PEER = $83
NB65_ERROR_INPUT_TOO_LARGE = $84
NB65_ERROR_DEVICE_FAILURE = $85
NB65_ERROR_OPTION_NOT_SUPPORTED = $FE
NB65_ERROR_FUNCTION_NOT_SUPPORTED = $FF
.endif