State - If 0 is transmitted - - index If 1 is transmitted - - its name If 2 is transmitted - the last state used is string_len+1 bytes that terminate with a NULL character. string_len should be 127 bytes or so. Chain - If 0 is transmitted - - index If 1 - - its name If 2 is transmitted - the last state used Return Values - 0 - OK 1 - Wrong Input Packet Range - start= end= If start > end then it's a terminator. Packet Ranges Specifier - .... IP Component - ip= netmask_width= inverse= IP Component Terminator - ip=255.255.255.255 but there is still a netmask and a packet range specifier for parity. IP Filter - Split Linear Specifier Token : prob= delay= terminator (last element) is when prob=1. Split Linear Specifier: ... Delay Type - any of: 1. Exponential 0x0 2. Split Linear 0x1 Protocol Operations: * Define a new chain. Input: <0x0000> chain_name= Output : chain_number= Note: even if RetValue indicates failure we still broadcast the chain number, which should be ignored by the front-end. * Define a new state in a chain. Input: <0x0001> chain= state_name= Output : state_number= * Define the move probabilities between states @source to states @dest. (by using a matrix of inputs) inside a chain. Input: <0x0002> chain= scalar(@source)= scalar(@dest)= $source[0]= $source[1]= . . $dest[0]= $dest[1]= $dest[2]= probs($s -> $d)= (scalar(@source)*scalar(@dest) of them) Return: * Chain Filters: - Set source to something. Input: <0x0003> chain= filter= Output: - Set dest to something Input: <0x0004> chain= filter= Output: - Enable/Disable Protocol X. Input: <0x0005> chain= protocol_id= - If = 256 then all protocols should be enabled or disabled. enable_or_disable= Output: - Set TOS Precedence Bits Input: <0x0006> chain= Precedence = Output: - Set TOS bits mask Input: <0x0007> chain= tos_bits_mask= Output: - Set Min. packet length Input: <0x0008> chain= Min_Packet_Length= Output: - Set Max. packet length Input: <0x0009> chain= Max_Packet_Length= Output: - Set Which packet length Input: <0x000a> chain= Which_Packet-Length= Can be - 0 - don't care. 1 - Greater than min 2 - Lower than max 3 - Between min and max 4 - Not between min and max. Output: * Retrieve the index of the chain (by name). Input: <0x000b> chain= Output: chain#= * Retrieve the index of a state within a chain (by name). Input: <0x000c> chain= Output: state_index= * Retrieve the move probabilities between @source and @dest. Input: <0x000d> chain= scalar(@source)= scalar(@dest)= $source[0]= $source[1]= . . $dest[0]= $dest[1]= $dest[2]= Output: prob[$s][$d]= for each source and dest. * Set the drop/delay prob of a state. Input: <0x000e> chain= state= drop_prob= delay_prob= Output: * Set the delay function type of a state. Input: <0x000f> chain= state= delay_type= Output: * Set the split-linear delay function of a state. Input: <0x0010> chain= state= split_linear= Output: * Set the delay function's lambda. (in case it is Exponential). Input: <0x0011> chain= state= lambda= Output: * Set the time factor of a state. Input: <0x00013> chain= state= time_factor= Output: * Set the stable delay probability of a state. (we mean that packets are sent in the order in which they were received). Input: <0x0014> chain= state= prob= Output: * Delete a state from a chain. Input: <0x0015> chain= state= Output: * Delete an entire chain. Input: <0x0016> chain= Output: * Set a chain's current state. Input: <0x0017> chain= state= Output: * Dump all the information of all the chains. Input: <0x0018> Output: num_chains= @chains=@ where Output_Chain= name= current_state= time_of_last_packet=