CN115102621A - Serdes interface control system of optical communication equipment - Google Patents

Serdes interface control system of optical communication equipment Download PDF

Info

Publication number
CN115102621A
CN115102621A CN202210644084.7A CN202210644084A CN115102621A CN 115102621 A CN115102621 A CN 115102621A CN 202210644084 A CN202210644084 A CN 202210644084A CN 115102621 A CN115102621 A CN 115102621A
Authority
CN
China
Prior art keywords
module
type
ethernet
data packet
control system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210644084.7A
Other languages
Chinese (zh)
Other versions
CN115102621B (en
Inventor
张济
王勃
严恒辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Baigong Semiconductor Co ltd
Original Assignee
Shanghai Baigong Semiconductor Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Baigong Semiconductor Co ltd filed Critical Shanghai Baigong Semiconductor Co ltd
Priority to CN202210644084.7A priority Critical patent/CN115102621B/en
Publication of CN115102621A publication Critical patent/CN115102621A/en
Application granted granted Critical
Publication of CN115102621B publication Critical patent/CN115102621B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/40Transceivers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0003Details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0005Switch and router aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • H04Q11/0071Provisions for the electrical-optical layer interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • H04Q2011/0086Network resource allocation, dimensioning or optimisation

Abstract

The Serdes interface control system comprises a capture module, a decoding module, a detection module, a processing module, a statistical module and a management module, wherein the processing module is used for establishing a corresponding rate configuration table for each classified content and setting a corresponding maximum transmission rate for the internet access equipment according to the content type detected by the system, and the processing module comprises a main conveying module, a secondary conveying module and a judgment module. The Serdes interface control system of the optical communication equipment can dynamically optimize the real-time transmission rate while meeting the requirements of transmission specifications by detecting the transmission content in real time, thereby meeting the low power consumption requirement of a PON gateway and having higher transmission efficiency.

Description

Serdes interface control system of optical communication equipment
Technical Field
The invention relates to the technical field of optical communication equipment, in particular to a Serdes interface control system of optical communication equipment.
Background
Optical communication devices refer to communication devices that transmit information using light waves. The system consists of a signal sending part, a signal transmission part and a signal receiving part 3. According to different transmission media, the laser communication device is divided into an atmospheric laser communication device, an optical fiber laser communication device, a space laser communication device and a waveguide type laser communication device, and the laser communication device has the advantages of large information capacity, interference resistance, strong confidentiality, light equipment and the like. However, the atmospheric laser communication device cannot pass through an obstacle due to attenuation of laser light propagating in the atmosphere, and therefore, the device is difficult to aim and affects communication distance. Fiber optic communication devices preferably overcome these disadvantages. The waveguide type laser communication device has a disadvantage that the influence of external conditions (soil layer movement, temperature change) is large. Space laser communication devices are quite complex and under development.
The transmission rate of the existing communication equipment in the current market is fixed, the loss generated by the transmission rate cannot be set more finely, the transmission rate cannot be dynamically optimized according to the transmission content, and the low-power consumption requirement of the PON gateway cannot be met, so that the bandwidth of a transmission channel cannot be used more sufficiently and effectively, and the transmission efficiency is lower.
Disclosure of Invention
The main objective of the present invention is to provide a Serdes interface control system of an optical communication device, which can effectively solve the problems in the background art that the transmission rate is fixed, the loss caused by the transmission rate cannot be set more finely, the transmission rate cannot be dynamically optimized according to the transmission content, and thus the low power consumption requirement of a PON gateway cannot be met, so that the bandwidth of a transmission channel cannot be used more sufficiently and effectively, and the transmission efficiency is low.
In order to achieve the purpose, the invention adopts the technical scheme that: a Serdes interface control system of optical communication equipment comprises a PON gateway connected with Internet equipment, a CP U installed in the PON gateway and a Serdes interface control system embedded in a CPU, wherein the Serdes interface control system comprises a capture module, a decoding module, a detection module, a processing module, a statistical module and a management module;
the acquisition module is used for receiving a data packet sent to the PON gateway by the scanning internet access device in real time, searching and acquiring a current network data packet of the internet access device, and then integrating and transmitting the current network data packet to the decoding module;
the decoding module is used for receiving the network data packet acquired by the capturing module, decoding the network data packet, extracting payload data which is payload data of the network data packet, and then transmitting the extracted payload data to the detection module;
the detection module is used for receiving the payload data decoded by the decoding module, and analyzing and classifying the payload data;
the processing module establishes a corresponding rate configuration table for each classified content, and sets a corresponding maximum transmission rate for the internet access device according to the content type detected by the system, the processing module comprises a main conveying module, a secondary conveying module and a judging module, and the judging module is used for judging the relationship between the internet access rate preset in the P ON gateway and the existing internet access rate and controlling the service transmission rate of the secondary conveying module;
the statistical module is used for recording the internet surfing behavior of the internet surfing equipment connected with the PON gateway, including the internet surfing content and the transmission rate in each time period, generating a corresponding Log Log record and outputting the Log Log record to a file in a text format, and a user can inquire related information through the Log Log file;
the management module is used for the PON gateway operation and maintenance personnel to remotely Log in the system to modify the classified content and the preset rate configuration table and allow the PON gateway operation and maintenance personnel to remotely check the corresponding Log Log records.
Preferably, the data packet capturing comprises the steps of: firstly, calling a created Socket to obtain the copy of an original data packet, then transmitting the data packet to a BPF filter for filtering, judging whether the copied data packet is discarded or reserved by a B PF filter according to a user rule, copying the data packet meeting the user rule into a kernel buffer area, filtering out the data packet not meeting the rule, then acquiring a complex data packet by calling a Pcap _ loop () function, and calling a callback function when capturing a data packet.
Preferably, the prototype of the pcap _ loop function is pcap _ loop (pcap _ t p, intcnt, pc _ handle callback, u _ char user), the callback function is used for calling a parsing function, one of the parameters of the callback function is a pointer pkt pointing to a head pcap _ pkthd r structure in the pcap file, and a pointer pointing to a grabbed data packet, and the pcap _ pkthdr structure is as follows:
pkt_datastruct pcap_pkthdr{
struct timeval ts; v. timestamp +
bpf _ u _ int32 caplen; v length of captured portion · s- × · captured portion · captured portion · s · captured portion · s · captured portion ·., portion ·., portion., s., portion ·, s ·, captured portion ·, s ·, s ·, captured portion ·, s ·, s., s ·
bpf _ u _ int32 len; v. packet length &
};
Preferably, the decoding module analyzes the ethernet frame header, the IP layer, and the transport layer header of the data PACKET in sequence, and puts the analyzed information into a self-defined structure PACKET, where the structure of the PACKET is:
typedef struct tagPACKET
{
char pData; v. points to the original packet pointer +
sint32 nCapLen; v. points to packet length +
sint32 nDataLen; v original packet length · original packet length ·., original packet length ·., s ·., original packet can
U int8 nLinkType; /' Link layer type
uint8 nNetworkType; v. network layer type
U nt8 n protocol type; v protocol layer type ·
uint8 nDirectType; v. packet direction +
uint32 nProto; v. protocol type +
U int32 nUserip; network endianness of address of subscriber
U int32 nSrcIp; v source address (host endian). + -
U nt32 nDstIp; v. destination Address (host endian). s
uchar @ praaldata; v. the pointer points to payload data of TCP and UDP
int nRealDataLen; payload data length of/TCP and UDP
radius/Link layer header
{ EtherHdr × eh; v. Ethernet header
Trh_hdr*th;
Fddi_hdr*fh;
}Link;
union/network layer header
{IPHdr*ip;
EtherARP*arp;
}Network;
Union/transport layer header
{ICMPHdr*icmp;
TCPHdr*tcp;
UDPHdr*udp;
GREHdr*gre;
}Protocol;
}LINUX_PACKED PACKET
The link layer type of the PACKET structure is an ethernet type, all contents of an ethernet frame can be obtained by converting the content of a data PACKET pointed by pkt into an EtherHdr format, and then a switch statement as follows is adopted to select a corresponding parsing function according to the protocol type for further execution:
#define Z_ETHERNET_TYPE_IP 0x0800
#define Z_ETHERNET_TYPE_ARP 0x0806
#define Z_ETHERNET_TYPE_REVARP 0x8035
switch(htons(pPacket->Link.eh->ether_type))
{
case Z _ ETHERNET _ TYPE _ IP:// judging that the protocol in the Ethernet is IP protocol
returnDecodeIP(pPacket,pkt+ETHERNET_HEADER_LEN,len-ETHERNET_HE ADER_LEN);
Where ETHERNET HEADER LEN is the ETHERNET HEADER size, calculate the offset of the IP layer
case Z _ ETHERNET _ TYPE _ ARP:// judging ARP protocol
case Z _ ETHERNET _ TYPE _ REVARP:// judging RARP protocol
returnDecodeARP(pPacket,pkt+ETHERNET_HEADER_LEN,len-ETHERNET_H EADER_LEN);
....
}
Wherein type 0800 is an IP datagram, type 0806 is an ARP request/response, and type 8035 is an RARP request/response.
Preferably, the EtherHdr format is a pPacket- > link.eh point, and the EtherHdr format includes a source mac address, a destination mac address, and a protocol type.
Preferably, the parsing of the IP packet is performed in a DecodeIP (pPacket, pkt + hlen, IP _ len-hlen) function, and the header IPHdr of the IP datagram is obtained as follows:
pPacket->nNetworkType=NETWORK_IP;
PPacket->Network.ip=ip=(IPHdr*)pk;
the protocol type of the transport layer is acquired from the protocol field in the IP header, then stored in i p _ proto, and the DecodeICMP () function is called to perform protocol parsing according to the value in the IP _ proto.
Preferably, the detection module employs an ORACLE database to store categorized content including video, animation, music, downloads, games, VOIP services, peer-to-peer network services, application stores, navigation, multimedia messaging, reading, financial, microblog, web browsing, security antivirus, instant messaging, mailbox, payment, location and other services.
Preferably, the secure antivirus, instant messaging, mailbox, payment, location and content of the primary transport module are matched, and the video, cartoon, music, download, game, VOIP service, peer-to-peer network service, application store, navigation, multimedia message, reading, financial, microblog, web browsing and other services are matched with the secondary transport module.
Preferably, the Log file in the statistical module is used for recording information of interaction between the system and users of the system, and is a data collection method for automatically capturing types, contents or time of interaction between a person and a system terminal.
Compared with the prior art, the invention has the following beneficial effects:
1. according to the invention, by detecting the transmission content in real time, the real-time transmission rate can be dynamically optimized while meeting the requirements of transmission specifications, so that the low-power consumption requirement of the PON gateway can be met, the transmission efficiency is higher, and the utilization rate of optical fibers deployed along the line can be improved for operators.
2. In the invention, a rate configuration table of each classified content is preset (the rate configuration table specifies the maximum transmission rate of different classified contents at different download network speeds of a PON gateway, and is initially set to be 2M-500M), and the corresponding maximum transmission rate is set for the internet access equipment according to the content type detected by the system; if the category of the internet content is not changed, the original transmission rate of the internet equipment is maintained.
3. In the invention, by matching the safety antivirus, instant communication, mailbox, payment and positioning with the content of the main conveying module, the video, cartoon, music, download, game, VOIP service, peer-to-peer network service, application store, navigation, multimedia message, reading, financial channel, microblog, web browsing and other services are matched with the secondary conveying module, when the PON gateway internet access rate is limited, the transmission rate of the last-time conveying module of other internet access equipment is reduced, and the internet access rate of the main conveying module is preferentially ensured.
Drawings
Fig. 1 is a schematic diagram of an internal structure of a PON gateway of a Serdes interface control system of an optical communication device according to the present invention;
fig. 2 is an enlarged schematic view of the internal structure of the CPU of the Serdes interface control system of the optical communication device according to the present invention;
fig. 3 is a schematic diagram of a work flow of the Serdes interface control system of the optical communication device according to the present invention;
fig. 4 is an enlarged schematic diagram of a structure a of fig. 3 of the Serdes interface control system of the optical communication device according to the present invention;
fig. 5 is an enlarged schematic diagram of a structure B of the Serdes interface control system of the optical communication device in fig. 3 according to the present invention;
fig. 6 is a schematic diagram of a work flow of a primary transport module and a secondary transport module of a Serdes interface control system of an optical communication device according to the present invention.
Detailed Description
In order to make the technical means, the creation characteristics, the achievement purposes and the effects of the invention easy to understand, the invention is further described with the specific embodiments.
In the description of the present invention, it should be noted that the terms "upper", "lower", "inner", "outer", "front", "rear", "both ends", "one end", "the other end", and the like indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element referred to must have a specific orientation, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless explicitly stated or limited otherwise, the terms "mounted," "disposed," "connected," and the like are to be construed broadly, such as "connected," which may be a fixed connection, a detachable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Referring to fig. 1 to 6, the present invention is a Serdes interface control system of an optical communication device, including a PON gateway connected to an internet access device, a CPU installed in the PON gateway, and a Serdes interface control system embedded in a C PU, and is characterized in that: the Serdes interface control system comprises a capturing module, a decoding module, a detection module, a processing module, a statistical module and a management module;
the acquisition module is used for receiving a data packet which is sent to the PON gateway by the scanning internet access equipment in real time, searching and acquiring a current network data packet of the internet access equipment, and then integrating and transmitting the current network data packet to the decoding module;
the decoding module is used for receiving the network data packet acquired by the capturing module, decoding the network data packet, extracting payload data which is payload data of the network data packet, and then transmitting the extracted payload data to the detection module;
the detection module is used for receiving the payload data decoded by the decoding module, and analyzing and classifying the payload data;
the processing module is used for establishing a corresponding rate configuration table for each classified content, setting a corresponding maximum transmission rate for the internet access equipment according to the content type detected by the system, and comprises a main conveying module, a secondary conveying module and a judging module, wherein the judging module is used for judging the relationship between the internet access rate preset in the PON gateway and the existing internet access rate and controlling the service transmission rate of the secondary conveying module;
the statistical module is used for recording the internet surfing behavior of the internet surfing equipment connected with the PON gateway, including internet surfing contents and transmission rate of each time period, generating corresponding Log Log records and outputting the Log Log records to a file in a text format, and a user can inquire related information through the Log Log files;
and the management module is used for the PON gateway operation and maintenance personnel to remotely Log in the system to modify the classified content and the preset rate configuration table and allow the PON gateway operation and maintenance personnel to remotely check the corresponding Log Log records.
The data packet capturing comprises the following steps: firstly, calling a created Socket to obtain the copy of an original data packet, then transmitting the data packet to a BPF filter for filtering, wherein the BPF filter needs to judge whether to discard or keep the copied data packet according to a user rule, the data packet conforming to the user rule is copied into a kernel buffer, the data packet not conforming to the rule is filtered, then, calling a Pcap _ loop () function to collect a complex data packet, and calling a c allback function when capturing one data packet.
The prototype of the pcap _ loop function is pcap _ loop (pcap _ t p, intcnt, pcap _ handlercalback, u _ char user), the callback function is used for calling the parsing function, and one parameter in the parameters of the callback function is a pointer to the pointer pk t of the head pcap _ pkthdr structure in the pcap file, and the pointer to the grabbed data packet, and the pcap _ pkthdr structure is as follows:
pkt_datastruct pcap_pkthdr{
struct timeval ts; v. timestamp +
bpf _ u _ int32 caplen; v. length of captured portion
bpf _ u _ int32 len; v. packet length +
};
4. A Serdes interface control system of an optical communication apparatus according to claim 3, characterized in that: the decoding module analyzes the Ethernet frame head, the IP layer and the transmission layer head of the data PACKET in sequence, and puts the analyzed information into a self-defined structure body PACKET, wherein the structure body of the PACKET is as follows:
typedef struct tagPACKET
{
char pData; v. points to the original packet pointer +
sint32 nCapLen; v. points to packet length +
sint32 nDataLen; v original packet length · original packet length ·., original packet length ·., s ·., original packet can
U int8 nLinkType; /Link layer type · x/x +
uint8 nNetworkType; v. network layer type &
U nt8 n protocol type; v protocol layer type ·
uint8 nDirectType; v. packet direction +
U int32 n Proto; v. protocol type +
uint32 nUserip; network endianness of address of subscriber
uint32 nSrcIp; v source address (host endian). + -
uint32 nDstip; /. destination Address (host endian)./
uchar @ praaldata; v. the pointer points to payload data of TCP and UDP
int nRealDataLen; payload data length of/TCP and UDP
radius/Link layer header
{ EtherHdr × eh; v. Ethernet header
Trh_hdr*th;
Fddi_hdr*fh;
}Link;
union/network layer header
{IPHdr*ip;
EtherARP*arp;
}Network;
Union/transport layer header
{ICMPHdr*icmp;
TCPHdr*tcp;
UDPHdr*udp;
GREHdr*gre;
}Protocol;
}LINUX_PACKED PACKET
The link layer type of the PACKET structure is an ethernet type, the entire content of the ethernet frame can be obtained by converting the content of the data PACKET pointed by pkt into an EtherHdr format, and then the following switch statements are adopted to select a corresponding analytic function according to the protocol type for further execution:
#define Z_ETHERNET_TYPE_IP 0x0800
#define Z_ETHERNET_TYPE_ARP 0x0806
#define Z_ETHERNET_TYPE_REVARP 0x8035
switch(htons(pPacket->Link.eh->ether_type))
{
case Z _ ETHERNET _ TYPE _ IP:// judging that the protocol in the Ethernet is IP protocol
returnDecodeIP(pPacket,pkt+ETHERNET_HEADER_LEN,len-ETHERNET_HE ADER_LEN);
Where ETHERNET HEADER LEN is the ETHERNET HEADER size, calculate the offset of the IP layer
case Z _ ETHERNET _ TYPE _ ARP:// judgment ARP protocol
case Z _ ETHERNET _ TYPE _ REVARP:// judging RARP protocol
returnDecodeARP(pPacket,pkt+ETHERNET_HEADER_LEN,len-ETHERNET_H EADER_LEN);
....
}
Wherein type 0800 is an IP datagram, type 0806 is an ARP request/response, and type 8035 is an RARP request/response.
The EtherHdr format is pPacket- > Link.eh pointing, and comprises a source mac address, a destination mac address and a protocol type.
The parsing of the IP packet is performed in a DecodeIP (pPacket, pkt + hlen, IP _ len-hlen) function, and the header IPHdr of the IP datagram is obtained as follows:
pPacket->nNetworkType=NETWORK_IP;
PPacket->Network.ip=ip=(IPHdr*)pk;
the decodeeICMP () function is called to perform protocol parsing by acquiring the protocol type of the transport layer from the protocol field in the IP header, then saving it in i p _ proto, and depending on the value in IP _ proto.
The detection module employs the ORACLE database to store classified content including video, animation, music, downloads, games, VOIP services, peer-to-peer network services, application stores, navigation, multimedia messaging, reading, financial, microblog, web browsing, security antivirus, instant messaging, mailbox, payment, location and other services.
The safety antivirus, instant communication, mailbox, payment and positioning are matched with the content of the main delivery module, and the video, cartoon, music, download, game, VOIP service, peer-to-peer network service, application store, navigation, multimedia message, reading, finance, microblog, web browsing and other services are matched with the secondary delivery module.
The Log file in the statistical module is used for recording the interactive information between the system and the users of the system, and is a data collection method for automatically capturing the interactive type, content or time between a person and a system terminal.
Examples
The Serdes interface control system is used as an embedded program and is installed in a CPU of the PON gateway, and the system is automatically loaded when the PO N gateway equipment is started or restarted.
2. The capture module of the system scans the IP data packet sent by the internet access device to the PON gateway in real time, searches and acquires the current network IP data packet of the internet access device, and sends the current network IP data packet to the data decoding module of the system for processing.
3. The "decoding module" of the system decodes the acquired network IP data packet and extracts payload (payload data).
4. The 'detection module' of the system analyzes the decoded payload data, classifies the current internet content in terms of flow statistics, and classifies the current internet content into more than 20 classes including video, animation, music, download, games, VOIP services, peer-to-peer network services, application stores, navigation, multimedia messages, reading, finance, microblogging, browsing web pages, safety antivirus, instant messaging, mailboxes, payment, positioning and other services.
5. The processing module of the system presets a rate configuration table (table 1) of each classified content, and sets a corresponding maximum transmission rate for the internet access equipment according to the content type detected by the system; if the category of the internet content is not changed, the original transmission rate of the internet equipment is maintained.
TABLE 1 Rate configuration Table
Figure RE-GDA0003797672030000131
Figure RE-GDA0003797672030000141
6. The processing module of the system defaults to set a main transmission module of safety antivirus, instant messaging, mailbox, payment and positioning, reduces the transmission rate of the last transmission module of other internet access equipment when the internet access rate of the PON gateway is limited, and preferentially ensures the internet access rate of the main transmission module.
7. A statistical module of the system records the internet surfing behavior of the internet surfing equipment connected with the PON gateway, including the internet surfing content and the transmission rate in each time period, generates a corresponding Log Log record and outputs the Log record to a file in a text format, and a user can inquire related information through the Log Log file.
8. The management module of the system allows the PON gateway operation and maintenance personnel to remotely log in the system to modify the classification content and the preset rate configuration table, and allows the PON gateway operation and maintenance personnel to remotely check the corresponding L og log records.
The working principle of the invention is as follows: by detecting the transmission content in real time, the real-time transmission rate can be dynamically optimized while the transmission specification requirements are met, so that the low-power consumption requirement of the PON gateway can be met, the transmission efficiency is higher, and the utilization rate of optical fibers deployed along the line can be improved by operators.
The foregoing shows and describes the general principles and broad features of the present invention and advantages thereof. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are merely illustrative of the principles of the present invention, but that various changes and modifications may be made without departing from the spirit and scope of the invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (9)

1. A Serdes interface control system of optical communication equipment comprises a PON gateway connected with Internet access equipment, a CPU installed in the PON gateway and a Serdes interface control system embedded in the CPU, and is characterized in that: the Serdes interface control system comprises a capturing module, a decoding module, a detection module, a processing module, a statistical module and a management module;
the acquisition module is used for receiving a data packet sent to the PON gateway by the scanning internet access device in real time, searching and acquiring a current network data packet of the internet access device, and then integrating and transmitting the current network data packet to the decoding module;
the decoding module is used for receiving the network data packet acquired by the capturing module, decoding the network data packet, extracting payload data which is payload data of the network data packet, and then transmitting the extracted payload data to the detection module;
the detection module is used for receiving the payload data decoded by the decoding module, and analyzing and classifying the payload data;
the processing module establishes a corresponding rate configuration table for each classified content, and sets a corresponding maximum transmission rate for the internet access device according to the content type detected by the system, the processing module comprises a main conveying module, a secondary conveying module and a judging module, and the judging module is used for judging the relationship between the internet access rate preset in the PON gateway and the existing internet access rate and controlling the service transmission rate of the secondary conveying module;
the statistical module is used for recording the internet surfing behavior of the internet surfing equipment connected with the PON gateway, including internet surfing contents and transmission rate of each time period, generating corresponding Log Log records and outputting the Log Log records to a file in a text format, and a user can inquire related information through the Log Log files;
and the management module is used for a PON gateway operation and maintenance person to remotely Log in the system to modify the classified content and the preset rate configuration table and allow the PON gateway operation and maintenance person to remotely check the corresponding Log Log record.
2. A Serdes interface control system for an optical communication device according to claim 1, wherein: the data packet capturing comprises the following steps: firstly, calling the created Socket to obtain the copy of an original data packet, then transmitting the data packet to a BPF filter for filtering, wherein the BPF filter needs to judge whether to discard or keep the copied data packet according to a user rule, the data packet conforming to the user rule is copied into a kernel buffer area, the data packet not conforming to the user rule is filtered, then, calling a Pcap _ loop () function to collect a complex data packet, and calling a callback function when capturing one data packet.
3. A Serdes interface control system for an optical communication device according to claim 2, wherein: the prototype of the pcap _ loop function is pcap _ loop (pcap _ t p, intcnt, pcap _ handlercallback, u _ char user), the callback function is used for calling a parsing function, one of the parameters of the callback function is a pointer to a head pcap _ pkthdr structural body pkt in the pcap file, and the other pointer to a grabbed data packet, and the pcap _ pkthdr structural body is shown as follows:
pkt_datastruct pcap_pkthdr{
struct timeval ts; v. timestamp +
bpf _ u _ int32 caplen; v. length of captured portion
bpf _ u _ int32 len; v. packet length +
}。
4. A Serdes interface control system for an optical communication device according to claim 3, wherein: the decoding module analyzes an Ethernet frame header, an IP layer and a transmission layer header of the data PACKET in sequence, and puts analyzed information into a self-defined structure PACKET, wherein the structure of the PACKET is as follows:
typedef struct tagPACKET
{
charpdata; v. points to the original packet pointer +
sint32 nCapLen; v. points to packet length +
sint32 nDataLen; v original packet length +
U int8 nLinkType; /Link layer type · x/x +
uint8 nNetworkType; v. network layer type
U nt8 n protocol type; protocol layer type/. The
uint8 nDirectType; v. packet direction +
uint32 nProto; v. protocol type +
uint32 nUserip; network endianness of address of subscriber
uint32 nSrcIp; v source address (host endian). + -
uint32 nDstip; v. destination Address (host endian). s
uchar pRealData; /. the pointer points to payload data in TCP and UDP
int nRealDataLen; payload data length of/TCP and UDP
radius/Link layer header
{ EtherHdr × eh; /' ethernet header · ethernet head ·
Trh_hdr*th;
Fddi_hdr*fh;
}Link;
union/network layer header
{IPHdr*ip;
EtherARP*arp;
}Network;
Union/transport layer header
{ICMPHdr*icmp;
TCPHdr*tcp;
UDPHdr*udp;
GREHdr*gre;
}Protocol;
}LINUX_PACKED PACKET
The link layer type of the PACKET structure is an ethernet type, all contents of an ethernet frame can be obtained by converting the content of a data PACKET pointed by pkt into an EtherHdr format, and then a switch statement as follows is adopted to select a corresponding parsing function according to the protocol type for further execution:
#define Z_ETHERNET_TYPE_IP 0x0800
#define Z_ETHERNET_TYPE_ARP 0x0806
#define Z_ETHERNET_TYPE_REVARP 0x8035
switch(htons(pPacket->Link.eh->ether_type))
{
case Z _ ETHERNET _ TYPE _ IP:// judging that the protocol in the Ethernet is IP protocol
returnDecodeIP(pPacket,pkt+ETHERNET_HEADER_LEN,len-ETHERNET_HE ADER_LEN);
Where ETHERNET _ HEADER _ LEN is the ETHERNET HEADER size, calculate the offset of the IP layer
case Z _ ETHERNET _ TYPE _ ARP:// judging ARP protocol
case Z _ ETHERNET _ TYPE _ REVARP:// judging RARP protocol
returnDecodeARP(pPacket,pkt+ETHERNET_HEADER_LEN,len-ETHERNET_HEADER_LEN);
....
}
Wherein type 0800 is an IP datagram, type 0806 is an ARP request/response, and type 8035 is an RARP request/response.
5. A Serdes interface control system for an optical communication device as claimed in claim 4, wherein: the EtherHdr format is a pPacket- > Link.eh direction, and comprises a source mac address, a destination mac address and a protocol type.
6. A Serdes interface control system for an optical communication device as claimed in claim 5, wherein: the analysis of the IP data packet is performed in a DecodeIP (pPacket, pkt + hlen, IP _ len-hl en) function, and the header IPHdr of the IP datagram is obtained in the following manner:
pPacket->nNetworkType=NETWORK_IP;
PPacket->Network.ip=ip=(IPHdr*)pk;
acquiring the protocol type of a transport layer from a protocol field in an IP header, storing the protocol type into IP _ proto, and calling a DecodeICMP () function to perform protocol analysis according to the value in the IP _ proto.
7. A Serdes interface control system for an optical communication device according to claim 6, wherein: the detection module employs an ORACLE database to store classified content including video, animation, music, downloads, games, VOIP services, peer-to-peer network services, application stores, navigation, multimedia messages, reading, finance, micro blogging, browsing web pages, security antivirus, instant messaging, mailbox, payment, location and other services.
8. A Serdes interface control system for an optical communication device according to claim 7, wherein: the security antivirus, instant messaging, mailbox, payment and positioning are matched with the content of the main conveying module, and the video, cartoon, music, download, game, VOIP service, peer-to-peer network service, application store, navigation, multimedia message, reading, financial, microblog, web browsing and other services are matched with the secondary conveying module.
9. A Serdes interface control system for an optical communication device according to claim 8, wherein: the Log Log file in the statistical module is used for recording interactive information between the system and the users of the system, and is a data collection method for automatically capturing the interactive type, content or time between a person and a system terminal.
CN202210644084.7A 2022-06-08 2022-06-08 Serdes interface control system of optical communication equipment Active CN115102621B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210644084.7A CN115102621B (en) 2022-06-08 2022-06-08 Serdes interface control system of optical communication equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210644084.7A CN115102621B (en) 2022-06-08 2022-06-08 Serdes interface control system of optical communication equipment

Publications (2)

Publication Number Publication Date
CN115102621A true CN115102621A (en) 2022-09-23
CN115102621B CN115102621B (en) 2023-03-14

Family

ID=83289182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210644084.7A Active CN115102621B (en) 2022-06-08 2022-06-08 Serdes interface control system of optical communication equipment

Country Status (1)

Country Link
CN (1) CN115102621B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101383787A (en) * 2008-10-23 2009-03-11 武汉长光科技有限公司 Three in one network type household gateway based on EPON access
CN104022920A (en) * 2014-06-26 2014-09-03 重庆重邮汇测通信技术有限公司 LTE (long term evolution) network flow recognition system and method
US20140269314A1 (en) * 2013-03-15 2014-09-18 General Instrument Corporation Adaptive resource management for multi-screen video applications over cable wi-fi networks
US20170339277A1 (en) * 2014-10-27 2017-11-23 Rideshark Corporation Methods and systems for notifications in communications networks
US20180225230A1 (en) * 2015-09-15 2018-08-09 Gatekeeper Ltd. System and method for securely connecting to a peripheral device
CN109309605A (en) * 2018-11-26 2019-02-05 北京邮电大学 Band network telemetry system and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101383787A (en) * 2008-10-23 2009-03-11 武汉长光科技有限公司 Three in one network type household gateway based on EPON access
US20140269314A1 (en) * 2013-03-15 2014-09-18 General Instrument Corporation Adaptive resource management for multi-screen video applications over cable wi-fi networks
CN104022920A (en) * 2014-06-26 2014-09-03 重庆重邮汇测通信技术有限公司 LTE (long term evolution) network flow recognition system and method
US20170339277A1 (en) * 2014-10-27 2017-11-23 Rideshark Corporation Methods and systems for notifications in communications networks
US20180225230A1 (en) * 2015-09-15 2018-08-09 Gatekeeper Ltd. System and method for securely connecting to a peripheral device
CN109309605A (en) * 2018-11-26 2019-02-05 北京邮电大学 Band network telemetry system and method

Also Published As

Publication number Publication date
CN115102621B (en) 2023-03-14

Similar Documents

Publication Publication Date Title
USRE49126E1 (en) Real-time adaptive processing of network data packets for analysis
US7623466B2 (en) Symmetric connection detection
KR101888831B1 (en) Apparatus for collecting device information and method thereof
Inacio et al. {YAF}: Yet another flowmeter
EP3780523B1 (en) Network traffic identification method and related device
US7013342B2 (en) Dynamic tunnel probing in a communications network
CN106815112B (en) Massive data monitoring system and method based on deep packet inspection
CN100493094C (en) P2P data message detection method based on character code
US20060212942A1 (en) Semantically-aware network intrusion signature generator
CN105024971A (en) Communication protocol conversion method and communication protocol conversion device
US20110125748A1 (en) Method and Apparatus for Real Time Identification and Recording of Artifacts
CN102387045B (en) Embedded point to point (P2P) flow monitoring system and method thereof
KR101602189B1 (en) traffic analysis and network monitoring system by packet capturing of 10-giga bit data
CN108229159B (en) Malicious code detection method and system
CN105871658B (en) A kind of Network Sniffing method based on OpenWRT system
TW202127834A (en) Threat detection system for mobile communication system, and global device and local device thereof
CN102510563A (en) Method and system for detecting malicious software of mobile Internet
CN115102621B (en) Serdes interface control system of optical communication equipment
CN110691007A (en) Method for accurately measuring QUIC connection packet loss rate
EP1758338B1 (en) Secure communication method and equipment for processing SEND data packets
CN110620775A (en) Method for capturing and analyzing GPON control management protocol data packet
WO2024037024A1 (en) Telemetry method and system based on user content
WO2024060408A1 (en) Network attack detection method and apparatus, device and storage medium
KR20060063564A (en) An apparatus for capturing internet protocol(ip) packet with sampling and signature searching function, and a method thereof
WO2017196842A1 (en) Monitoring network traffic to determine similar content

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A Serdes Interface Control System for Optical Communication Equipment

Effective date of registration: 20230719

Granted publication date: 20230314

Pledgee: Industrial and Commercial Bank of China Limited Shanghai Changning sub branch

Pledgor: SHANGHAI BAIGONG SEMICONDUCTOR Co.,Ltd.

Registration number: Y2023980049092

PE01 Entry into force of the registration of the contract for pledge of patent right