mirror of
https://github.com/PDP-10/stacken.git
synced 2026-01-27 20:27:27 +00:00
79 lines
1.8 KiB
Plaintext
79 lines
1.8 KiB
Plaintext
universial ipsym
|
|
.directive .nobinary
|
|
|
|
; UDP.
|
|
|
|
opdef udp. [call [sixbit 'udp.']]
|
|
|
|
phase 0
|
|
.udfnc: block 1 ;Function code.
|
|
.uddev: block 1 ;Device/channel.
|
|
.udflg: block 1 ;Flags/mode bits.
|
|
ud.raw==1b0 ; Raw IP packets in/out
|
|
ud.icm==1b1 ; Read all ICMP, as raw packets.
|
|
.udlad: block 1 ;local address.
|
|
.udrad: block 1 ;remote address.
|
|
.udlpr: block 1 ;local port.
|
|
.udrpr: block 1 ;remote port.
|
|
.udbuf: block 1 ;data block pointer.
|
|
.udcnt: block 1 ;data byte count.
|
|
.udlen: block 0 ;length of data block.
|
|
dephase
|
|
|
|
;* Error codes:
|
|
|
|
udilf%==1 ;Illegal function.
|
|
udadc%==2 ;Address check.
|
|
udrqe%==3 ;Receive queue empty.
|
|
udnpv%==4 ;Need privs for that.
|
|
udtqf%==5 ;Transmit queue full. (please wait)
|
|
udilp%==6 ;Illegal local port.
|
|
udila%==7 ;Illegal local address.
|
|
udirp%==10 ;Illegal (zero?) remote port.
|
|
udira%==11 ;Illegal (zero?) remote address.
|
|
udnec%==12 ;Not enough core.
|
|
udnsd%==13 ;No such device.
|
|
|
|
;* Function codes:
|
|
|
|
.udget==0 ;Get parameters (local/remote port/address, flags)
|
|
.udset==1 ;Set parapeters
|
|
.udwri==2 ;Write data
|
|
.udrea==3 ;Read data
|
|
.udchk==4 ;Check input queue
|
|
|
|
; TCP.
|
|
|
|
opdef tcp. [call [sixbit 'tcp.']]
|
|
|
|
phase 0
|
|
.tcfnc: block 1 ;Function code.
|
|
.tcdev: block 1 ;Device/channel.
|
|
.tcflg: block 1 ;Flags etc.
|
|
.tclad: block 1 ;local address.
|
|
.tcrad: block 1 ;remote address.
|
|
.tclpr: block 1 ;local port.
|
|
.tcrpr: block 1 ;remote port.
|
|
.tcbuf: block 1 ;status buffer ptr.
|
|
.tccnt: block 1 ;status buffer size.
|
|
.tclen: block 0 ;length of data block.
|
|
dephase
|
|
|
|
;* error codes:
|
|
|
|
tcilf%==1 ;Illegal function.
|
|
tcnsd%==2 ;No such device.
|
|
tcntc%==3 ;Not a TCP device.
|
|
|
|
tcurk%==17 ;other error.
|
|
|
|
;* function codes:
|
|
|
|
.tcfoa==0 ;Open active.
|
|
.tcfop==1 ;Open passive.
|
|
.tcfcl==2 ;Close.
|
|
.tcfab==3 ;Abort.
|
|
.tcfgs==4 ;Get status etc.
|
|
|
|
end
|