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

Class NBNSRegistrationRequest

scapy/layers/netbios.py:288–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286# RFC1002 sect 4.2.2
287
288class NBNSRegistrationRequest(Packet):
289 name = "NBNS registration request"
290 fields_desc = [
291 NetBIOSNameField("QUESTION_NAME", "Windows"),
292 ShortEnumField("SUFFIX", 0x4141, _NETBIOS_SUFFIXES),
293 ByteField("NULL", 0),
294 ShortEnumField("QUESTION_TYPE", 0x20, _NETBIOS_QRTYPES),
295 ShortEnumField("QUESTION_CLASS", 1, _NETBIOS_QRCLASS),
296 ShortEnumField("RR_NAME", 0xC00C, _NETBIOS_RNAMES),
297 ShortEnumField("RR_TYPE", 0x20, _NETBIOS_QRTYPES),
298 ShortEnumField("RR_CLASS", 1, _NETBIOS_QRCLASS),
299 IntField("TTL", 0),
300 ShortField("RDLENGTH", 6),
301 BitEnumField("G", 0, 1, _NETBIOS_GNAMES),
302 BitEnumField("OWNER_NODE_TYPE", 00, 2,
303 _NETBIOS_OWNER_MODE_TYPES),
304 BitEnumField("UNUSED", 0, 13, {0: "Unused"}),
305 IPField("NB_ADDRESS", "127.0.0.1")
306 ]
307
308 def mysummary(self):
309 return self.sprintf("Register %G% %QUESTION_NAME% at %NB_ADDRESS%")
310
311
312bind_bottom_up(NBNSHeader, NBNSRegistrationRequest, OPCODE=0x5)

Callers

nothing calls this directly

Calls 7

NetBIOSNameFieldClass · 0.90
ShortEnumFieldClass · 0.90
ByteFieldClass · 0.90
IntFieldClass · 0.90
ShortFieldClass · 0.90
BitEnumFieldClass · 0.90
IPFieldClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…