The new kernel source file net/magnet/magnet.c contains the core functionality of MAGNeT. The function magnet_add(), defined in magnet.c, adds a data point to a circular buffer that is pinned in physical memory. This function is designed to be very lightweight so that it can be called at several points in the protocol stack without inducing a significant amount of overhead in the protocol processing. (see Section 3.5 for an analysis.) Other code in magnet.c sets up the circular buffer and the necessary hooks for the user-application program to read data from the buffer. In addition, a new item is added to the file space at /proc/net/magnet. This file may be read by any user to determine the current state and parameters of the MAGNeT kernel code.