print-rrcp.c (235530) | print-rrcp.c (241235) |
---|---|
1/* 2 * Copyright (c) 2007 - Andrey "nording" Chernyak <andrew@nording.ru> 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that: (1) source code distributions 6 * retain the above copyright notice and this paragraph in its entirety, (2) 7 * distributions including binary code include the above copyright notice and 8 * this paragraph in its entirety in the documentation or other materials --- 88 unchanged lines hidden (view full) --- 97 98 ND_TCHECK(*(rrcp + RRCP_PROTO_OFFSET)); 99 rrcp_proto = *(rrcp + RRCP_PROTO_OFFSET); 100 ND_TCHECK(*(rrcp + RRCP_OPCODE_ISREPLY_OFFSET)); 101 rrcp_opcode = (*(rrcp + RRCP_OPCODE_ISREPLY_OFFSET)) & RRCP_OPCODE_MASK; 102 ND_PRINT((ndo, "%s > %s, %s %s", 103 etheraddr_string(ESRC(ep)), 104 etheraddr_string(EDST(ep)), | 1/* 2 * Copyright (c) 2007 - Andrey "nording" Chernyak <andrew@nording.ru> 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that: (1) source code distributions 6 * retain the above copyright notice and this paragraph in its entirety, (2) 7 * distributions including binary code include the above copyright notice and 8 * this paragraph in its entirety in the documentation or other materials --- 88 unchanged lines hidden (view full) --- 97 98 ND_TCHECK(*(rrcp + RRCP_PROTO_OFFSET)); 99 rrcp_proto = *(rrcp + RRCP_PROTO_OFFSET); 100 ND_TCHECK(*(rrcp + RRCP_OPCODE_ISREPLY_OFFSET)); 101 rrcp_opcode = (*(rrcp + RRCP_OPCODE_ISREPLY_OFFSET)) & RRCP_OPCODE_MASK; 102 ND_PRINT((ndo, "%s > %s, %s %s", 103 etheraddr_string(ESRC(ep)), 104 etheraddr_string(EDST(ep)), |
105 tok2strbuf(proto_values,"RRCP-0x%02d",rrcp_proto,proto_str,sizeof(proto_str)), | 105 tok2strbuf(proto_values,"RRCP-0x%02x",rrcp_proto,proto_str,sizeof(proto_str)), |
106 ((*(rrcp + RRCP_OPCODE_ISREPLY_OFFSET)) & RRCP_ISREPLY) ? "reply" : "query")); 107 if (rrcp_proto==1){ 108 ND_PRINT((ndo, ": %s", | 106 ((*(rrcp + RRCP_OPCODE_ISREPLY_OFFSET)) & RRCP_ISREPLY) ? "reply" : "query")); 107 if (rrcp_proto==1){ 108 ND_PRINT((ndo, ": %s", |
109 tok2strbuf(opcode_values,"unknown opcode (0x%02d)",rrcp_opcode,opcode_str,sizeof(opcode_str)))); | 109 tok2strbuf(opcode_values,"unknown opcode (0x%02x)",rrcp_opcode,opcode_str,sizeof(opcode_str)))); |
110 } 111 if (rrcp_opcode==1 || rrcp_opcode==2){ 112 ND_TCHECK2(*(rrcp + RRCP_REG_ADDR_OFFSET), 6); 113 ND_PRINT((ndo, " addr=0x%04x, data=0x%08x", 114 EXTRACT_LE_16BITS(rrcp + RRCP_REG_ADDR_OFFSET), 115 EXTRACT_LE_32BITS(rrcp + RRCP_REG_DATA_OFFSET))); 116 } 117 if (rrcp_proto==1){ --- 26 unchanged lines hidden --- | 110 } 111 if (rrcp_opcode==1 || rrcp_opcode==2){ 112 ND_TCHECK2(*(rrcp + RRCP_REG_ADDR_OFFSET), 6); 113 ND_PRINT((ndo, " addr=0x%04x, data=0x%08x", 114 EXTRACT_LE_16BITS(rrcp + RRCP_REG_ADDR_OFFSET), 115 EXTRACT_LE_32BITS(rrcp + RRCP_REG_DATA_OFFSET))); 116 } 117 if (rrcp_proto==1){ --- 26 unchanged lines hidden --- |