MCPcopy Create free account
hub / github.com/secdev/scapy / OpcDaHeaderMessage

Class OpcDaHeaderMessage

scapy/contrib/opc_da.py:1122–1149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1120
1121
1122class OpcDaHeaderMessage(Packet):
1123 # An actual RPC PDU
1124 # DCE 1.1 RPC - 12.6.3.1
1125 name = "OpcDaHeader"
1126 deprecated_fields = {
1127 "pdu_type": ("pduType", "2.5.0"),
1128 }
1129 fields_desc = [
1130 ByteField('versionMajor', 0),
1131 ByteField('versionMinor', 0),
1132 ByteEnumField("pduType", 0, _pduType),
1133 FlagsField('pfc_flags', 0, 8, _pfc_flags),
1134 # Non-Delivery Report/Receipt (NDR) Format Label
1135 # DCE 1.1 RPC - 14.1
1136 BitEnumField('integerRepresentation', 1, 4,
1137 {0: "bigEndian", 1: "littleEndian"}),
1138 BitEnumField('characterRepresentation', 0, 4,
1139 {0: "ascii", 1: "ebcdic"}),
1140 ByteEnumField('floatingPointRepresentation', 0,
1141 {0: "ieee", 1: "vax", 2: "cray", 3: "ibm"}),
1142 ShortField('res', 0),
1143 ]
1144
1145 def guess_payload_class(self, payload):
1146 try:
1147 return _opcda_next_header[self.integerRepresentation]
1148 except Exception:
1149 pass
1150# try:
1151# return _opcDa_pdu_classes[self.pduType][self.integerRepresentation]
1152# except Exception:

Callers

nothing calls this directly

Calls 5

ByteFieldClass · 0.90
ByteEnumFieldClass · 0.90
FlagsFieldClass · 0.90
BitEnumFieldClass · 0.90
ShortFieldClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…