| 254 | |
| 255 | |
| 256 | class NBNSNodeStatusResponse(Packet): |
| 257 | name = "NBNS Node Status Response" |
| 258 | fields_desc = [NetBIOSNameField("RR_NAME", "windows"), |
| 259 | ShortEnumField("SUFFIX", 0x4141, _NETBIOS_SUFFIXES), |
| 260 | ByteField("NULL", 0), |
| 261 | ShortEnumField("RR_TYPE", 0x21, _NETBIOS_QRTYPES), |
| 262 | ShortEnumField("RR_CLASS", 1, _NETBIOS_QRCLASS), |
| 263 | IntField("TTL", 0), |
| 264 | ShortField("RDLENGTH", 83), |
| 265 | FieldLenField("NUM_NAMES", None, fmt="B", |
| 266 | count_of="NODE_NAME"), |
| 267 | PacketListField("NODE_NAME", |
| 268 | [NBNSNodeStatusResponseService()], |
| 269 | NBNSNodeStatusResponseService, |
| 270 | count_from=lambda pkt: pkt.NUM_NAMES), |
| 271 | SourceMACField("MAC_ADDRESS"), |
| 272 | XStrFixedLenField("STATISTICS", b"", 46)] |
| 273 | |
| 274 | def answers(self, other): |
| 275 | return ( |
| 276 | isinstance(other, NBNSNodeStatusRequest) and |
| 277 | other.QUESTION_NAME == self.RR_NAME |
| 278 | ) |
| 279 | |
| 280 | |
| 281 | bind_layers(NBNSHeader, NBNSNodeStatusResponse, |
nothing calls this directly
no test coverage detected
searching dependent graphs…