MAGNeT is designed to be extensible with respect to the specific events that are monitored. The current distribution instruments the general socket-handling code, the TCP layer, and the IP layer. Other protocols can be easily instrumented by adding new MAGNeT event codes to the enum definition in magnet.h and placing calls to magnet_add() at appropriate places in the protocol stack. Thus, the mechanisms provided by MAGNeT (that is, capturing application-level traces as well as intercepting protocol stack events) are available to all existing and future Linux networking protocols.
Our current MAGNeT distribution records events when the socket-handling code receives data from an application, when the TCP layer receives data from the socket-handling code, when the IP layer receives data from TCP, and, finally, when IP hands the data off to the network device driver. MAGNeT records a similar set of events for the receive pathway.
Without the optionally-compiled data field, MAGNeT records only the timestamp and associated data size for each transition between network-stack layers. With the data field compiled in, MAGNeT records more extensive data about the instantaneous state of the protocol being monitored. This data typically contains all protocol-header information as well as run-time, protocol-state variables, which are not usually available outside of experimental situations. As an example of the kind of information stored within the data field, Figure 3 shows the union members for TCP and IP events.
|