Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpacketdump/ip_89.c

    re224862 r387d299  
    1010static void dump_ospf_v2_header(libtrace_ospf_v2_t *hdr, unsigned len) {
    1111
    12         printf(" OSPF Header: Version %u Type %u ",
    13                         hdr->ospf_v, hdr->type);
     12        DISPLAY(hdr, ospf_v, " OSPF Header: Version %u");
     13        DISPLAY(hdr, type, " Type %u ");
    1414        switch(hdr->type) {
    1515                case TRACE_OSPF_HELLO:
     
    2929                        break;
    3030        }
     31        printf("\n");
    3132
    32         printf("\n OSPF Header: Length %u \n", ntohs(hdr->len));
    33         printf(" OSPF Header: Router Id %s ", inet_ntoa(hdr->router));
    34         printf("Area Id %s\n", inet_ntoa(hdr->area));
    35         printf(" OSPF Header: Checksum %u Auth Type %u\n", ntohs(hdr->sum),
    36                         ntohs(hdr->au_type));
    37 
    38         printf(" OSPF Header: Auth Key ID %u Auth Data Len %u\n",
    39                         hdr->au_key_id, hdr->au_data_len);
    40         printf(" OSPF Header: Auth Crypto Seq %u\n", ntohl(hdr->au_seq_num));
    41 
     33        DISPLAYS(hdr, ospf_len, "OSPF Header: Length %u \n");
     34        DISPLAYIP(hdr, router, " OSPF Header: Router Id %s ");
     35        DISPLAYIP(hdr, area, "Area Id %s\n");
     36        DISPLAYS(hdr, sum, " OSPF Header: Checksum %u ");
     37        DISPLAYS(hdr, au_type, "Auth Type %u\n");
     38        DISPLAY(hdr, au_key_id, " OSPF Header: Auth Key ID %u ");
     39        DISPLAY(hdr, au_data_len, "Auth Data Len %u\n");
     40        DISPLAYL(hdr, au_seq_num, " OSPF Header: Auth Crypto Seq %u\n");
    4241
    4342}
Note: See TracChangeset for help on using the changeset viewer.