- ep = (const struct ether_header *)cp;
- rrcp = (const struct rrcp_packet_t *)(cp+12);
- rrcp_hello = (const struct rrcp_helloreply_packet_t *)(cp+12);
-
- if (rrcp->rrcp_proto==1){
- strcpy(proto_str,"RRCP");
- }else if ( rrcp->rrcp_proto==2 ){
- strcpy(proto_str,"RRCP-REP");
- }else{
- sprintf(proto_str,"RRCP-0x%02d",rrcp->rrcp_proto);
- }
- if (rrcp->rrcp_opcode==0){
- strcpy(opcode_str,"hello");
- }else if ( rrcp->rrcp_opcode==1 ){
- strcpy(opcode_str,"get");
- }else if ( rrcp->rrcp_opcode==2 ){
- strcpy(opcode_str,"set");
- }else{
- sprintf(opcode_str,"unknown opcode (0x%02d)",rrcp->rrcp_opcode);
+ ndo->ndo_protocol = "rrcp";
+ rrcp_proto = GET_U_1(cp + RRCP_PROTO_OFFSET);
+ rrcp_opcode = GET_U_1((cp + RRCP_OPCODE_ISREPLY_OFFSET)) & RRCP_OPCODE_MASK;
+ if (src != NULL && dst != NULL) {
+ ND_PRINT("%s > %s, ",
+ (src->addr_string)(ndo, src->addr),
+ (dst->addr_string)(ndo, dst->addr));