TOPS-20 UDP: device Phil Budne @ Boston University / DSG GTJFN% Syntax is like TCP:, but the only attributes are LOCAL-HOST and FOREIGN-HOST (taking dotted decimal octets ie; 54.0.0.20). Only one open JFN per system can hold any local port at any time. Receives are independant of the 4n host/port (4n side looked at only for sends). Local port numbers are assigned as with TCP: if not specified by the user. (Cheats by using the same job unique number counter). Perhaps the number should be assigned at OPENF% time? I tried to fix some of the problems with host names in GTJFN%, but without success. OPENF% The legal byte sizes are 8. and 32. The only legal I/O mode is 0. All I/O is done "high thruput". That is a packet is sent when the current one is filled. SIN and BIN will read across packet boundries, while SINR will stop at the end of the current packet. SOUTR will force a 'PUSH' of the current packet. There is a bit in the UCB for interactive / hi-thruput, but I forget how much code there is to support it, in any case the bit is always lit. Interactive doesn't seem like a great idea for most UDP applications anyway. GDSTS% returns: AC2/ Count of packets waiting for input; system will only hold the first unread packets (currently 10.) before dropping new packets on the floor. I have thought of keeping track of how many packets have been thrown on the floor since the last read, and returning it in the left half. AC3/ 4n port of last packet. AC4/ 4n host of last packet. MTOPR% The MTOPR code usually does a linear search, so why not use SIXBIT!! .MOUOU==:'UOU' ;BLOCK OUTPUT FUNCTION .UDLEN==:0 ;LENGTH OF ARGBLOCK (INCLUDING THIS WORD) .UDBUF==:1 ;ADDRESS OF BUFFER CONTAINING L.JUST. OCTETS .UDSIZ==:2 ;OCTET COUNT .UDADR==:3 ;(OPTIONAL) INTERNET FOREIGN ADDRESS .UDPRT==:4 ;(OPTIONAL) FOREIGN PORT I've never tested this one!! .MOUPS==:'UPS' ;ASSIGN PSI CHANNEL Argument in channel. Channel 077 clears interrupts. This functions reassigns JFN ownership.