| 579 | static int sctp_audit_indx = 0; |
| 580 | |
| 581 | static |
| 582 | void |
| 583 | sctp_print_audit_report(void) |
| 584 | { |
| 585 | int i; |
| 586 | int cnt; |
| 587 | |
| 588 | cnt = 0; |
| 589 | for (i = sctp_audit_indx; i < SCTP_AUDIT_SIZE; i++) { |
| 590 | if ((sctp_audit_data[i][0] == 0xe0) && |
| 591 | (sctp_audit_data[i][1] == 0x01)) { |
| 592 | cnt = 0; |
| 593 | SCTP_PRINTF("\n"); |
| 594 | } else if (sctp_audit_data[i][0] == 0xf0) { |
| 595 | cnt = 0; |
| 596 | SCTP_PRINTF("\n"); |
| 597 | } else if ((sctp_audit_data[i][0] == 0xc0) && |
| 598 | (sctp_audit_data[i][1] == 0x01)) { |
| 599 | SCTP_PRINTF("\n"); |
| 600 | cnt = 0; |
| 601 | } |
| 602 | SCTP_PRINTF("%2.2x%2.2x ", (uint32_t)sctp_audit_data[i][0], |
| 603 | (uint32_t)sctp_audit_data[i][1]); |
| 604 | cnt++; |
| 605 | if ((cnt % 14) == 0) |
| 606 | SCTP_PRINTF("\n"); |
| 607 | } |
| 608 | for (i = 0; i < sctp_audit_indx; i++) { |
| 609 | if ((sctp_audit_data[i][0] == 0xe0) && |
| 610 | (sctp_audit_data[i][1] == 0x01)) { |
| 611 | cnt = 0; |
| 612 | SCTP_PRINTF("\n"); |
| 613 | } else if (sctp_audit_data[i][0] == 0xf0) { |
| 614 | cnt = 0; |
| 615 | SCTP_PRINTF("\n"); |
| 616 | } else if ((sctp_audit_data[i][0] == 0xc0) && |
| 617 | (sctp_audit_data[i][1] == 0x01)) { |
| 618 | SCTP_PRINTF("\n"); |
| 619 | cnt = 0; |
| 620 | } |
| 621 | SCTP_PRINTF("%2.2x%2.2x ", (uint32_t)sctp_audit_data[i][0], |
| 622 | (uint32_t)sctp_audit_data[i][1]); |
| 623 | cnt++; |
| 624 | if ((cnt % 14) == 0) |
| 625 | SCTP_PRINTF("\n"); |
| 626 | } |
| 627 | SCTP_PRINTF("\n"); |
| 628 | } |
| 629 | |
| 630 | void |
| 631 | sctp_auditing(int from, struct sctp_inpcb *inp, struct sctp_tcb *stcb, |