%include "Moose:Mouse.Inc" %include "GDMR_E:2Meg.Inc" %systemroutinespec phex2(%integer what) %externalpredicatespec FS lookup(%string(31) what, %integername value) %ownrecord(semaphore fm) semaphore = 0 %ownrecord(mailbox fm) reply box = 0 %ownrecord(mailbox fm)%name ether box == nil %ownrecord(ether request fm) request = 0 %ownrecord(ether request fm)%name reply == nil %ownrecord(ether stats fm) stats = 0 %begin %integer i %if FS lookup(ether mailbox name, i) %start ether box == record(i) %else printstring("No ether mailbox?"); newline %stop %finish setup semaphore(semaphore) setup mailbox(reply box, semaphore) setup message(request, size of(request)) request_code = ether stats request_stats == stats send message(request, ether box, reply box) reply == receive message(reply box) %if reply_status < 0 %start printstring("Request failed: ") printstring(ether errors(reply_status)) newline %stop %finish printstring("Station address is "); phex2(stats_station address); newline write(stats_buffer low water, 7); printstring(" buffer low water"); newline write(stats_unrecognised control, 7); printstring(" unrecognised control"); newline write(stats_inbound packets, 7); printstring(" inbound packets"); newline write(stats_inbound bytes, 7); printstring(" inbound bytes"); newline write(stats_outbound packets, 7); printstring(" outbound packets"); newline write(stats_outbound bytes, 7); printstring(" outbound bytes"); newline write(stats_dud destinations, 7); printstring(" dud destinations"); newline write(stats_dud types, 7); printstring(" dud types"); newline write(stats_old inbound packets, 7); printstring(" old inbound packets"); newline write(stats_old outbound packets, 7); printstring(" old outbound packets"); newline write(stats_old inbound no takers, 7); printstring(" old inbound no takers"); newline write(stats_old retransmits, 7); printstring(" old retransmits"); newline write(stats_old ACK timeouts, 7); printstring(" old ACK timeouts"); newline write(stats_old user timeouts, 7); printstring(" old user timeouts"); newline write(stats_old defines, 7); printstring(" old defines"); newline write(stats_old redefines, 7); printstring(" old redefines"); newline write(stats_old undefines, 7); printstring(" old undefines"); newline write(stats_old reads, 7); printstring(" old reads"); newline write(stats_old writes, 7); printstring(" old writes"); newline %end %of %program