remove legacy remnants and move ip,udp,ethernet logic into subpackages

This commit is contained in:
soypat
2025-02-20 16:00:55 -03:00
parent 0606a04f45
commit f86bb6f01a
22 changed files with 590 additions and 1885 deletions
+1 -119
View File
@@ -1,108 +1,9 @@
// Code generated by "stringer -type=EtherType,IPProto,ARPOp -linecomment -output stringers.go ."; DO NOT EDIT.
// Code generated by "stringer -type=IPProto -linecomment -output stringers.go ."; DO NOT EDIT.
package lneto2
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[EtherTypeIPv4-2048]
_ = x[EtherTypeARP-2054]
_ = x[EtherTypeWakeOnLAN-2114]
_ = x[EtherTypeTRILL-8947]
_ = x[EtherTypeDECnetPhase4-24579]
_ = x[EtherTypeRARP-32821]
_ = x[EtherTypeAppleTalk-32923]
_ = x[EtherTypeAARP-33011]
_ = x[EtherTypeIPX1-33079]
_ = x[EtherTypeIPX2-33080]
_ = x[EtherTypeQNXQnet-33284]
_ = x[EtherTypeIPv6-34525]
_ = x[EtherTypeEthernetFlowControl-34824]
_ = x[EtherTypeIEEE802_3-34825]
_ = x[EtherTypeCobraNet-34841]
_ = x[EtherTypeMPLSUnicast-34887]
_ = x[EtherTypeMPLSMulticast-34888]
_ = x[EtherTypePPPoEDiscovery-34915]
_ = x[EtherTypePPPoESession-34916]
_ = x[EtherTypeJumboFrames-34928]
_ = x[EtherTypeHomePlug1_0MME-34939]
_ = x[EtherTypeIEEE802_1X-34958]
_ = x[EtherTypePROFINET-34962]
_ = x[EtherTypeHyperSCSI-34970]
_ = x[EtherTypeAoE-34978]
_ = x[EtherTypeEtherCAT-34980]
_ = x[EtherTypeEthernetPowerlink-34987]
_ = x[EtherTypeLLDP-35020]
_ = x[EtherTypeSERCOS3-35021]
_ = x[EtherTypeHomePlugAVMME-35041]
_ = x[EtherTypeMRP-35043]
_ = x[EtherTypeIEEE802_1AE-35045]
_ = x[EtherTypeIEEE1588-35063]
_ = x[EtherTypeIEEE802_1ag-35074]
_ = x[EtherTypeFCoE-35078]
_ = x[EtherTypeFCoEInit-35092]
_ = x[EtherTypeRoCE-35093]
_ = x[EtherTypeCTP-36864]
_ = x[EtherTypeVeritasLLT-51966]
_ = x[EtherTypeVLAN-33024]
_ = x[EtherTypeServiceVLAN-34984]
}
const _EtherType_name = "IPv4ARPwake on LANTRILLDECnetPhase4RARPAppleTalkAARPVLANIPx1IPx2QNXQnetIPv6EthernetFlowCtlIEEE802.3CobraNetMPLS UnicastMPLS MulticastPPPoE discoveryPPPoE sessionjumbo frameshome plug 1 0mmeIEEE 802.1xprofinethyper SCSIAoEEtherCATservice VLANEthernet powerlinkLLDPSERCOS3home plug AVMMEMRPIEEE 802.1aeIEEE 1588IEEE 802.1agFCoEFCoE initRoCECTPVeritas LLT"
var _EtherType_map = map[EtherType]string{
2048: _EtherType_name[0:4],
2054: _EtherType_name[4:7],
2114: _EtherType_name[7:18],
8947: _EtherType_name[18:23],
24579: _EtherType_name[23:35],
32821: _EtherType_name[35:39],
32923: _EtherType_name[39:48],
33011: _EtherType_name[48:52],
33024: _EtherType_name[52:56],
33079: _EtherType_name[56:60],
33080: _EtherType_name[60:64],
33284: _EtherType_name[64:71],
34525: _EtherType_name[71:75],
34824: _EtherType_name[75:90],
34825: _EtherType_name[90:99],
34841: _EtherType_name[99:107],
34887: _EtherType_name[107:119],
34888: _EtherType_name[119:133],
34915: _EtherType_name[133:148],
34916: _EtherType_name[148:161],
34928: _EtherType_name[161:173],
34939: _EtherType_name[173:189],
34958: _EtherType_name[189:200],
34962: _EtherType_name[200:208],
34970: _EtherType_name[208:218],
34978: _EtherType_name[218:221],
34980: _EtherType_name[221:229],
34984: _EtherType_name[229:241],
34987: _EtherType_name[241:259],
35020: _EtherType_name[259:263],
35021: _EtherType_name[263:270],
35041: _EtherType_name[270:285],
35043: _EtherType_name[285:288],
35045: _EtherType_name[288:300],
35063: _EtherType_name[300:309],
35074: _EtherType_name[309:321],
35078: _EtherType_name[321:325],
35092: _EtherType_name[325:334],
35093: _EtherType_name[334:338],
36864: _EtherType_name[338:341],
51966: _EtherType_name[341:352],
}
func (i EtherType) String() string {
if str, ok := _EtherType_map[i]; ok {
return str
}
return "EtherType(" + strconv.FormatInt(int64(i), 10) + ")"
}
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
@@ -289,22 +190,3 @@ func (i IPProto) String() string {
return "IPProto(" + strconv.FormatInt(int64(i), 10) + ")"
}
}
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[ARPRequest-1]
_ = x[ARPReply-2]
}
const _ARPOp_name = "requestreply"
var _ARPOp_index = [...]uint8{0, 7, 12}
func (i ARPOp) String() string {
i -= 1
if i >= ARPOp(len(_ARPOp_index)-1) {
return "ARPOp(" + strconv.FormatInt(int64(i+1), 10) + ")"
}
return _ARPOp_name[_ARPOp_index[i]:_ARPOp_index[i+1]]
}