- switch (bp->bp_op) {
-
- case BOOTREQUEST:
- /* Usually, a request goes from a client to a server */
- if (sport == IPPORT_BOOTPC && dport == IPPORT_BOOTPS)
- printf("\n\tRequest");
- break;
-
- case BOOTREPLY:
- /* Usually, a reply goes from a server to a client */
- if (sport == IPPORT_BOOTPS && dport == IPPORT_BOOTPC)
- printf("\n\tReply");
- break;
-
- default:
- printf("\n\tbootp-#%d", bp->bp_op);
- break;
+
+ printf("BOOTP/DHCP, %s",
+ tok2str(bootp_op_values, "unknown (0x%02x)", bp->bp_op));
+
+ if (bp->bp_htype == 1 && bp->bp_hlen == 6 && bp->bp_op == BOOTPREQUEST) {
+ TCHECK2(bp->bp_chaddr[0], 6);
+ printf(" from %s", etheraddr_string(bp->bp_chaddr));