; SNAP SVC TEST PACKET ; ; snap prototype packet ; ; (c) 2003, Willem de Bruijn ; all code is licensed under the BSD License ; NB: this does not necessary apply to the SNAP interpreter code ; written by Jonathan Moore of the University of Pennsylvania dforw ; continue until at route destination bne atsource-pc ; at dest. 1st dest or return trip? ; if we are at the destination execute the requests ; example timed comparison (trend-analysis) ; get the inbound traffic count push "ifInUcastPkts.2" ; CHOOSE VARIABLE HERE calls "snmp_getsingle" push "sysUpTime.0" calls "snmp_getsingle" div ; get the dx ; get the old count push "intrafficdx" calls "memmap_getint" ; push the new value push "intrafficdx" ; push the variable name pull 1 ; get the needed value on top calls "memmap_addint" ; compare multi 2 ; give error if > twice previous value gt bez isok-pc ; error condition push "possible error detected" ji gohome-pc ; no worries isok: push "ok" ; go to source gohome: push 1 getsrc dforwto pop atsource: ; at the source: print result push 7777 ; push clientport demux ; send top stackvalue to the client #data 0 ; compile time stack entry