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

Serdes interface control system of optical communication equipment Download PDF

Info

Publication number
CN115102621B
CN115102621B CN202210644084.7A CN202210644084A CN115102621B CN 115102621 B CN115102621 B CN 115102621B CN 202210644084 A CN202210644084 A CN 202210644084A CN 115102621 B CN115102621 B CN 115102621B
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.)
Active
Application number
CN202210644084.7A
Other languages
Chinese (zh)
Other versions
CN115102621A (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 invention discloses a Serdes interface control system of optical communication equipment, which relates to the technical field of optical communication equipment and comprises a PON gateway connected with internet equipment, a CPU (Central processing Unit) installed in the PON gateway and a Serdes interface control system embedded in the CPU, wherein 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 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 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 device 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 phenomenon of laser light propagating in the atmosphere, and is difficult to aim, thereby affecting communication distance. While 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 are in the development stage.
The transmission rate of the existing communication equipment in the market is fixed, the loss caused by the transmission rate cannot be set more finely, and the transmission rate cannot be dynamically optimized according to the transmission content, so that the low-power consumption requirement of a PON gateway cannot be met, the bandwidth of a transmission channel cannot be used more fully 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 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 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;
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 arriving 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 rule is filtered, then, calling a Pcap _ loop () function to collect a complex data packet, and calling a callback function when catching one data packet.
Preferably, the prototype of the pcap _ loop () function is pcap _ loop (pcap _ t _ p, intcnt, pcap _ handlercallback, u _ char user), the callback function is used to call 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 another pointer pointing to a captured data packet, and the pcap _ pkthdr structure is shown as follows:
pkt_datastructpcap_pkthdr{
structtimevalts; /' timestamp
bpf _ u _ int32caplen; v. length of captured portion
bpf _ u _ int32len; v. packet length &
}。
Preferably, the decoding module analyzes an ethernet frame header, an IP layer, and a transport layer header of the data PACKET in sequence, and places the analyzed information into a self-defined structure PACKET, where the structure of the PACKET is:
typedefstructtagPACKET
{
char pData; v. points to the original packet pointer +
sint32nCapLen; v. points to packet length +
sint32nDataLen; /. Original data packet length x
U int8nLinkType; /' Link layer type
A uint8nNetworkType; v. network layer type &
A unt 8nProtocolType; protocol layer type/. The
uint8nDirectType; v packet direction &
U int32n Proto; v. protocol type +
U int32nUserip; network endianness of address of subscriber
U int32nSrcIp; v source address (host endian). + -
uint32nDstIp; v destination Address: (master endian).)
uchar pRealData; /. The pointer points to payload data in TCP and UDP
intnRealDataLen; 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_PACKEDPACKET
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 corresponding analysis function is selected by adopting the following switch statement according to the protocol type to further execute the following steps:
#defineZ_ETHERNET_TYPE_IP0x0800
#defineZ_ETHERNET_TYPE_ARP0x0806
#defineZ_ETHERNET_TYPE_REVARP0x8035
switch(htons(pPacket->Link.eh->ether_type))
{
caseZ _ 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
caseZ _ ETHERNET _ TYPE _ ARP:// ARP protocol is judged
caseZ _ ETHERNET _ TYPE _ REVARP:// judging RARP protocol
returnDecodeARP(pPacket,pkt+ETHERNET_HEADER_LEN,len-ETHERNET_HEADER_LEN);
}
The type 0800 is IP datagram, the type 0806 is ARP request/response, and the type 8035 is RARP request/response.
Preferably, the EtherHdr format is a pPacket- > link.
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 the protocol type is stored in the IP _ proto, and the DecodeICMP () function is called to perform protocol analysis on the IP _ proto according to the value in the IP _ proto.
Preferably, the detection module employs an ORACLE database to store categorized content including videos, animations, music, downloads, games, VOIP services, peer-to-peer network services, application stores, navigation, multimedia messages, reading, finance, micro blogging, browsing web pages, secure antivirus, instant messaging, mailboxes, payments, location and other services.
Preferably, the secure antivirus, instant messaging, mailbox, payment, location matches the content of the primary delivery module, and the video, animation, music, download, game, VOIP service, peer-to-peer network service, application store, navigation, multimedia message, reading, financial, microblog, web browsing, and other services match the secondary delivery 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 prescribes 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 fig. 3 of the Serdes interface control system of the optical communication device 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 explained by combining 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 orientations or positional relationships shown in the drawings, and are only for convenience of description and simplification of description, but do not indicate or imply that the device or element referred to must have a specific orientation, be configured in a specific orientation, and operate, 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 is to be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "disposed," "connected," and the like are to be construed broadly, and for example, "connected" 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 for 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 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 device in real time, searching and acquiring a current network data packet of the internet 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 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 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;
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 allowing the PON gateway operation and maintenance person to remotely check the corresponding Log Log record.
The data packet capturing comprises the following steps: firstly, calling a created Socket to obtain the copy of an arriving 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 rule is filtered, then, calling a Pcap _ loop () function to collect a complex data packet, and calling a callback function when catching one data packet.
The prototype of the pcap _ loop () function is pcap _ loop (pcap _ t p, intcnt, pcap _ handle allback, 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 the head pcap _ pkthdr structural body pkt in the pcap file, and the other pointer to the captured data packet, and the pcap _ pkthdr structural body is as follows:
pkt_datastructpcap_pkthdr{
structtimevalts; /' timestamp
bpf _ u _ int32caplen; v. length of captured portion
bpf _ u _ int32len; 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 the analyzed information into a self-defined structural body PACKET, wherein the structural body of the PACKET is as follows:
typedefstructtagPACKET
{
char pData; v. points to the original packet pointer +
sint32nCapLen; v. points to packet length +
sint32nDataLen; v original packet length +
uint8nLinkType; /' Link layer type
A uint8nNetworkType; v. network layer type
A unt 8nProtocolType; protocol layer type/. The
uint8nDirectType; v. packet direction +
uint32nProto; v. protocol type +
uint32nUserip; network endianness of address of subscriber
U int32nSrcIp; source address (host) endian) · based on
uint32nDstIp; v destination Address: (master endian).)
uchar @ praaldata; v. the pointer points to payload data of TCP and UDP
intnRealDataLen; 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_PACKEDPACKET
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 a corresponding analysis function is selected by using a switch statement as follows according to the protocol type to further execute:
#defineZ_ETHERNET_TYPE_IP0x0800
#defineZ_ETHERNET_TYPE_ARP0x0806
#defineZ_ETHERNET_TYPE_REVARP0x8035
switch(htons(pPacket->Link.eh->ether_type))
{
caseZ _ 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
caseZ _ ETHERNET _ TYPE _ ARP:// ARP protocol is judged
caseZ _ ETHERNET _ TYPE _ REVARP:// judging RARP protocol
returnDecodeARP(pPacket,pkt+ETHERNET_HEADER_LEN,len-ETHERNET_HEADER_LEN);
}
The type 0800 is IP datagram, the type 0806 is ARP request/response, and the type 8035 is 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 protocol type of the transport layer is acquired from a protocol field in an IP header, then the protocol type is stored in IP _ proto, and a DecodeICMP () function is called to perform protocol analysis according to the value in the IP _ proto.
The detection module uses the ORACLE database to store classified content including videos, animations, music, downloads, games, VOIP services, peer-to-peer network services, application stores, navigation, multimedia messages, reading, finance, microblogs, browsing web pages, security antivirus, instant messaging, mailboxes, payment, and location.
The safety antivirus, instant communication, 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, finance, microblog and browsing webpage are matched with the secondary conveying 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 network access device to the PON gateway in real time, searches and acquires the current network IP data packet of the network 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 categories including video, cartoon, music, download, game, VOIP service, peer-to-peer network service, application store, navigation, multimedia message, reading, finance, microblog, browsing web page, safety antivirus, instant messaging, mailbox, payment, positioning and the like.
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 GDA0004036899490000131
Figure GDA0004036899490000141
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 Log 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 features of the present invention, together with the 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 given by way of illustration 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, and such changes and modifications are 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 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 acquisition 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 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.
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 a created Socket to obtain the copy of an arriving 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 rule is filtered, then, calling a Pcap _ loop () function to collect a complex data packet, and calling a callback function when catching one data packet.
3. A Serdes interface control system of optical communication apparatus according to claim 2, wherein: the prototype of the pcap _ loop () function is pcap _ loop (pcap _ t p, intcnt, pca p _ handlercallback, u _ char user), the callback function is used for calling a parsing function, and one of the parameters of the callback function is a pointer to the head pcap _ pkthd r structure in the pcap file, and a pointer to the grabbed data packet, and the pcap _ pkthdr structure is as follows:
pkt_datastructpcap_pkthdr{
structtimevalts; /' timestamp
bpf _ u _ int32caplen; v. captured fraction length of (b)
bpf _ u _ int32len; 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 a data PACKET in sequence, and puts the analyzed information into a self-defined structure PACKET, wherein the structure of the PACKET is as follows:
typedefstructtagPACKET
{
char pData; /' points to original packet pointer
sint32nCapLen; v. points to packet length &
sint32nDataLen; v original packet length +
uint8nLinkType; /' Link layer type
A uint8nNetworkType; v. network layer type &
A uint8nProtocolType; v. protocol layer type +
uint8nDirectType; v. packet direction +
uint32nProto; v. protocol type +
U int32nUserip; network endianness of address of subscriber
U int32nSrcIp; v source address (host) endian) is greater than or equal to
uint32nDstIp; v destination Address: (master endian).)
uchar @ praaldata; the pointer points to payload data of TCP and UDP/intnRealDataLen; 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_PACKEDPACKET
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 corresponding analysis function is selected by adopting the following switch statement according to the protocol type to further execute the following steps:
#defineZ_ETHERNET_TYPE_IP0x0800
#defineZ_ETHERNET_TYPE_ARP0x0806
#defineZ_ETHERNET_TYPE_REVARP0x8035
switch(htons(pPacket->Link.eh->ether_type))
{
caseZ _ 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
caseZ _ ETHERNET _ TYPE _ ARP:// ARP protocol is judged
caseZ _ 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;
the protocol type of the transport layer is acquired from the protocol field in the IP header, then the protocol type is stored in the IP _ proto, and the DecodeICMP () function is called to perform protocol analysis on the IP _ proto 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, secure disinfection, instant messaging, mailboxes, payments, and positioning.
8. A Serdes interface control system for an optical communication device according to claim 7, wherein: the safety antivirus, instant communication, 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, finance, microblog and browsing webpage 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 CN115102621A (en) 2022-09-23
CN115102621B true 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)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101383787B (en) * 2008-10-23 2012-06-27 武汉长光科技有限公司 Three in one network type household gateway based on EPON access
BR112015022278B1 (en) * 2013-03-15 2023-05-16 Arris International Ip Ltd NETWORK-BASED METHOD FOR MANAGING ADAPTIVE CONTINUOUS TRANSMISSION RESOURCE IN A HETEROGENEOUS CABLE WI-FI NETWORK AND CABLE MODEM TERMINATION SYSTEM
CN104022920B (en) * 2014-06-26 2017-11-21 重庆重邮汇测通信技术有限公司 A kind of LTE network flux recognition system and method
CN107005615B (en) * 2014-10-27 2020-11-06 瑞德史可集团 Notification method and system of communication network
EP3317802B1 (en) * 2015-09-15 2019-05-29 Gatekeeper Ltd. System and method for securely connecting to a peripheral device
CN109309605B (en) * 2018-11-26 2020-08-25 北京邮电大学 In-band network telemetry system and method

Also Published As

Publication number Publication date
CN115102621A (en) 2022-09-23

Similar Documents

Publication Publication Date Title
USRE49126E1 (en) Real-time adaptive processing of network data packets for analysis
US7623466B2 (en) Symmetric connection detection
EP3780523B1 (en) Network traffic identification method and related device
CN100493094C (en) P2P data message detection method based on character code
KR101888831B1 (en) Apparatus for collecting device information and method thereof
US20110125748A1 (en) Method and Apparatus for Real Time Identification and Recording of Artifacts
CN105024971A (en) Communication protocol conversion method and communication protocol conversion device
US20100027430A1 (en) Apparatus and Method for Network Analysis
CN111147305A (en) Network asset portrait extraction method
CN107666486A (en) A kind of network data flow restoration methods and system based on message protocol feature
US11650994B2 (en) Monitoring network traffic to determine similar content
WO2024060408A1 (en) Network attack detection method and apparatus, device and storage medium
TW202127834A (en) Threat detection system for mobile communication system, and global device and local device thereof
JP6548823B2 (en) Real-time validation of JSON data applying tree graph properties
CN102510563A (en) Method and system for detecting malicious software of mobile Internet
CN101321097A (en) Tencent network living broadcast business recognition method based on payload depth detection
CN115102621B (en) Serdes interface control system of optical communication equipment
EP1758338B1 (en) Secure communication method and equipment for processing SEND data packets
CN110149245A (en) The compressed sensing based high-speed network flow method of sampling and device
US9584549B2 (en) Image monitoring framework
WO2006066444A1 (en) Connection-oriented junk mail filtering system and method
CN113377051B (en) Network safety protection equipment based on FPGA
CN114553546A (en) Message capturing method and device based on network application
US9716600B1 (en) Augmented router processing
CN111200543A (en) Encryption protocol identification method based on active service detection engine technology

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
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