Patent attributes
A method of automatically identifying state information in different middlebox programs first identifies relevant program portions by expanding outward from a packet processing loop to statements dependent either by control or data dependency on that packet processing loop. Persistent variables in the statements are then collected and optionally winnowed by whether they are “used” or modified by those statements. The identified state variables may be segregated according to flow-spaces and/or output function so that a request for state data may be tailored precisely to the necessary state data greatly reducing network burden in state data transfer.