| 482 | |
| 483 | |
| 484 | class ifaddrmsg(Packet): |
| 485 | fields_desc = [ |
| 486 | ByteEnumField("ifa_family", 0, socket.AddressFamily), |
| 487 | ByteField("ifa_prefixlen", 0), |
| 488 | FlagsField( |
| 489 | "ifa_flags", |
| 490 | 0, |
| 491 | -8, |
| 492 | { |
| 493 | 0x01: "IFA_F_SECONDARY", |
| 494 | 0x02: "IFA_F_NODAD", |
| 495 | 0x04: "IFA_F_OPTIMISTIC", |
| 496 | 0x08: "IFA_F_DADFAILED", |
| 497 | 0x10: "IFA_F_HOMEADDRESS", |
| 498 | 0x20: "IFA_F_DEPRECATED", |
| 499 | 0x40: "IFA_F_TENTATIVE", |
| 500 | 0x80: "IFA_F_PERMANENT", |
| 501 | }, |
| 502 | ), |
| 503 | ByteField("ifa_scope", 0), |
| 504 | Field("ifa_index", 0, fmt="=L"), |
| 505 | # Pay |
| 506 | PacketListField("data", [], ifaddrmsg_rtattr), |
| 507 | ] |
| 508 | |
| 509 | |
| 510 | bind_layers(rtmsghdr, ifaddrmsg, nlmsg_type=20) |
no test coverage detected