[ Home | What's New | Contents | Overview | Contributors | Distribution | Examples | Documentation | Manual | Publications | Mailing List Archive | Problems ] | This page was last updated by Axel Belinfante on 2003-08-05 | |
TorX Test Tool Information | ||
Prev | Next |
where primer-program is the actual primer program file that has to be invoked. So, all standard input send to the primer-program first passes through the instantiator. In the torx-config(4) configuration file (or in other places where we have to give the primer program file) we now give the wrapper script instead of the ``real'' primer program.
#! /bin/sh instantiator -s 0 -f instconfig.txt | primer-program "$@"
type : position : prefix : regexp : domainEmpty lines, lines containing only whitespace and comment lines (lines starting with optional whitespace followed by #) are ignored. Continuation lines are allowed: these should end with a \ character; this character is replaced by a space character when the lines are joined. leading and trailing whitespace in the lines, and in the fields (type, position, prefix, regexp, domain) is ignored.
from_upper!LEAVE!var_byte!var_byte from_lower!PDU_JOIN!var_byte!var_byte!var_byte!var_byteAll (most) variables here are of type ``byte'', even though semantically these ``bytes'' represent different things. That is why we need the position field here, to distinguish the different semantical domains.
# ================================== # empty lines and comment lines are ignored. # comment lines are lines that start with # (optional whitespace followed by) a hash sign (#). byte:2:C_INPUT:from_upper!JOIN!.*!.*:{1,2,3,4} byte:3:C_INPUT:from_upper!JOIN!.*!.*:{1,2} # NOTE: _both_ lines of this regexp group have same prefix; # if one line has C_INPUT and the other C_INPU(S?) then # only one instantiation will be done even if an input line # contains two var_byte fields... byte:2:C_INPUT(S?):from_upper!LEAVE!.*!.*:{1,2,3,4} byte:3:C_INPUT(S?):from_upper!LEAVE!.*!.*:{1,2} byte:2:C_INPUT:from_upper!DREQ!.*!.*:{1,2,3,4} byte:3:C_INPUT:from_upper!DREQ!.*!.*:{1} byte:2:C_INPUT:from_lower!PDU_JOIN!.*!.*!.*!.*:{1,2,3,4} byte:3:C_INPUT:from_lower!PDU_JOIN!.*!.*!.*!.*:{1,2} byte:4:C_INPUT:from_lower!PDU_JOIN!.*!.*!.*!.*:{0,2} byte:5:C_INPUT:from_lower!PDU_JOIN!.*!.*!.*!.*:{1} # ==================================
# ================================== byte:2:C_INPUT:from_upper!JOIN!.*!.*:{var_usertitle} byte:3:C_INPUT:from_upper!JOIN!.*!.*:{var_conferenceid} byte:2:C_INPUT:from_upper!LEAVE!.*!.*:{var_usertitle} byte:3:C_INPUT:from_upper!LEAVE!.*!.*:{var_conferenceid} byte:2:C_INPUT:from_upper!DREQ!.*!.*:{var_len} byte:3:C_INPUT:from_upper!DREQ!.*!.*:{var_data} byte:2:C_INPUT:from_lower!PDU_JOIN!.*!.*!.*!.*:{var_usertitle} byte:3:C_INPUT:from_lower!PDU_JOIN!.*!.*!.*!.*:{var_conferenceid} byte:4:C_INPUT:from_lower!PDU_JOIN!.*!.*!.*!.*:{var_udpaddr_src} byte:5:C_INPUT:from_lower!PDU_JOIN!.*!.*!.*!.*:{var_udpaddr_dst} byte:2:C_INPUT:from_lower!PDU_ANSWER!.*!.*!.*!.*:{var_usertitle} byte:3:C_INPUT:from_lower!PDU_ANSWER!.*!.*!.*!.*:{var_conferenceid} byte:4:C_INPUT:from_lower!PDU_ANSWER!.*!.*!.*!.*:{var_udpaddr_src} byte:5:C_INPUT:from_lower!PDU_ANSWER!.*!.*!.*!.*:{var_udpaddr_dst} byte:2:C_INPUT:from_lower!PDU_LEAVE!.*!.*!.*!.*:{var_usertitle} byte:3:C_INPUT:from_lower!PDU_LEAVE!.*!.*!.*!.*:{var_conferenceid} byte:4:C_INPUT:from_lower!PDU_LEAVE!.*!.*!.*!.*:{var_udpaddr_src} byte:5:C_INPUT:from_lower!PDU_LEAVE!.*!.*!.*!.*:{var_udpaddr_dst} byte:2:C_INPUT:from_lower!PDU_DATA!.*!.*!.*!.*:{var_len} byte:3:C_INPUT:from_lower!PDU_DATA!.*!.*!.*!.*:{var_data} byte:4:C_INPUT:from_lower!PDU_DATA!.*!.*!.*!.*:{var_udpaddr_src} byte:5:C_INPUT:from_lower!PDU_DATA!.*!.*!.*!.*:{var_udpaddr_dst} mtype:1:C_INPUT:from_lower!.*!.*!.*!.*!.*:{PDU_JOIN,PDU_ANSWER,PDU_LEAVE,PDU_DATA} mtype:1:C_INPUT:from_upper!.*!.*!.*:{JOIN,LEAVE,DREQ} usertitle:*:C_INPUT:from_upper!.*!.*!.*:{101,102,103,104} conferenceid:*:C_INPUT:from_upper!.*!.*!.*:{51,52} udpaddr_src:*:C_INPUT:from_upper!.*!.*!.*:{0,2} udpaddr_dst:*:C_INPUT:from_upper!.*!.*!.*:{1} len:*:C_INPUT:from_upper!.*!.*!.*:{21} data:*:C_INPUT:from_upper!.*!.*!.*:{31,32,33,34} usertitle:*:C_INPUT:from_lower!.*!.*!.*!.*!.*:{101,102,103,104} conferenceid:*:C_INPUT:from_lower!.*!.*!.*!.*!.*:{51,52} udpaddr_src:*:C_INPUT:from_lower!.*!.*!.*!.*!.*:{0,2} udpaddr_dst:*:C_INPUT:from_lower!.*!.*!.*!.*!.*:{1} len:*:C_INPUT:from_lower!.*!.*!.*!.*!.*:{21} data:*:C_INPUT:from_lower!.*!.*!.*!.*!.*:{31,32,33,34} unknown:*:C_INPUT:from_upper!.*!.*!.*:( join(var_usertitle,var_conferenceid) \ answer(var_usertitle,var_conferenceid) \ leave(var_usertitle,var_conferenceid) \ data(var_len,var_data) ) # ==================================
# ================================== DataField :*:C_INPUT:.*:{m1,m2,m3,m4} DataFieldLen :*:C_INPUT:.*:{l} UserTitle :*:C_INPUT:.*:{ut_A,ut_B,ut_C,ut_D} ConfIdent :*:C_INPUT:.*:{ci_one} # ConfIdent :*:C_INPUT:.*:{ci_one,ci_two} UDPAddress_dst:*:C_INPUT:.*:{udp1} UDPAddress_src:*:C_INPUT:.*:{udp2,udp3} CFsp :*:C_INPUT:.*:( datareq(var_DataField) \ join(var_UserTitle,var_ConfIdent) \ leave ) UDPsp :*:C_INPUT:.*:( udp_datareq(var_UDPAddress_dst,var_PDU) ) #UDPsp :*:C_INPUT:.*:( udp_dataind(var_UDPAddress_dst,var_PDU) ) PDU :*:C_INPUT:.*:( PDU_J(var_UserTitle,var_ConfIdent) \ # PDU_A(var_UserTitle,var_ConfIdent) \ # PDU_L(var_UserTitle,var_ConfIdent) \ PDU_D(var_DataFieldLen,var_DataField) ) # ==================================
Prev | Table of Contents | Next |
Appendix D: TorX Manual Pages: hexcontext(1) - run program in hexadecimal context | Appendix D: TorX Manual Pages: intersector(1) - combine multiple torx primers |