MCPcopy Create free account
hub / github.com/F-Stack/f-stack / logsctpassoc

Function logsctpassoc

freebsd/netinet/libalias/alias_sctp.c:2593–2632  ·  view source on GitHub ↗

@ingroup Logging * @brief Log an SCTP association's details * * @param assoc pointer to sctp association * @param s Character that indicates the state of processing for this packet */

Source from the content-addressed store, hash-verified

2591 * @param s Character that indicates the state of processing for this packet
2592 */
2593static void logsctpassoc(struct sctp_nat_assoc *assoc, char* s)
2594{
2595 struct sctp_GlobalAddress *G_Addr = NULL;
2596 char *sp;
2597 char addrbuf[INET_ADDRSTRLEN];
2598
2599 switch (assoc->state) {
2600 case SN_ID:
2601 sp = "ID ";
2602 break;
2603 case SN_INi:
2604 sp = "INi ";
2605 break;
2606 case SN_INa:
2607 sp = "INa ";
2608 break;
2609 case SN_UP:
2610 sp = "UP ";
2611 break;
2612 case SN_CL:
2613 sp = "CL ";
2614 break;
2615 case SN_RM:
2616 sp = "RM ";
2617 break;
2618 default:
2619 sp = "***ERROR***";
2620 break;
2621 }
2622 SctpAliasLog("%sAssoc: %s exp=%u la=%s lv=%u lp=%u gv=%u gp=%u tbl=%d\n",
2623 s, sp, assoc->exp, inet_ntoa_r(assoc->l_addr, addrbuf),
2624 ntohl(assoc->l_vtag), ntohs(assoc->l_port),
2625 ntohl(assoc->g_vtag), ntohs(assoc->g_port),
2626 assoc->TableRegister);
2627 /* list global addresses */
2628 LIST_FOREACH(G_Addr, &(assoc->Gaddr), list_Gaddr) {
2629 SctpAliasLog("\t\tga=%s\n",
2630 inet_ntoa_r(G_Addr->g_addr, addrbuf));
2631 }
2632}
2633
2634/** @ingroup Logging
2635 * @brief Output Global table to log

Callers 7

SctpAliasFunction · 0.85
AddSctpAssocLocalFunction · 0.85
AddSctpAssocGlobalFunction · 0.85
RmSctpAssocFunction · 0.85
logSctpGlobalFunction · 0.85
logSctpLocalFunction · 0.85
logTimerQFunction · 0.85

Calls 2

SctpAliasLogFunction · 0.85
inet_ntoa_rFunction · 0.85

Tested by

no test coverage detected