The key technology of net-charging based on data-link Layer is the capture and analysis of data frame. Firstly, The paper introduces the principle of sniffer technology to capture data packets, illustrates the structure and functions of libpcap library and winpcap(the windows version of libpcap) based on BPF and presents the design of packet capture class. Then, It introduces the types and structures of packets and presents the design of packet analysis class. Being adopted in the net-charging module, the useful information in parameter class are stored into the database system.
|