Changeset 974:2091bf698fb1 in freeDiameter for libfdcore/sctp.c
- Timestamp:
- Mar 15, 2013, 2:14:35 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdcore/sctp.c
r965 r974 88 88 return ENOTSUP; 89 89 } 90 fd_log_debug( "Def SCTP_RTOINFO : srto_initial : %u \n", rtoinfo.srto_initial);91 fd_log_debug( " srto_min : %u \n", rtoinfo.srto_min);92 fd_log_debug( " srto_max : %u \n", rtoinfo.srto_max);90 fd_log_debug( "Def SCTP_RTOINFO : srto_initial : %u", rtoinfo.srto_initial); 91 fd_log_debug( " srto_min : %u", rtoinfo.srto_min); 92 fd_log_debug( " srto_max : %u", rtoinfo.srto_max); 93 93 } 94 94 … … 103 103 /* Check new values */ 104 104 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_RTOINFO, &rtoinfo, &sz) ); 105 fd_log_debug( "New SCTP_RTOINFO : srto_initial : %u \n", rtoinfo.srto_initial);106 fd_log_debug( " srto_max : %u \n", rtoinfo.srto_max);107 fd_log_debug( " srto_min : %u \n", rtoinfo.srto_min);105 fd_log_debug( "New SCTP_RTOINFO : srto_initial : %u", rtoinfo.srto_initial); 106 fd_log_debug( " srto_max : %u", rtoinfo.srto_max); 107 fd_log_debug( " srto_min : %u", rtoinfo.srto_min); 108 108 } 109 109 } … … 127 127 return ENOTSUP; 128 128 } 129 fd_log_debug( "Def SCTP_ASSOCINFO : sasoc_asocmaxrxt : %hu \n", assoc.sasoc_asocmaxrxt);130 fd_log_debug( " sasoc_number_peer_destinations : %hu \n", assoc.sasoc_number_peer_destinations);131 fd_log_debug( " sasoc_peer_rwnd : %u \n" , assoc.sasoc_peer_rwnd);132 fd_log_debug( " sasoc_local_rwnd : %u \n" , assoc.sasoc_local_rwnd);133 fd_log_debug( " sasoc_cookie_life : %u \n" , assoc.sasoc_cookie_life);129 fd_log_debug( "Def SCTP_ASSOCINFO : sasoc_asocmaxrxt : %hu", assoc.sasoc_asocmaxrxt); 130 fd_log_debug( " sasoc_number_peer_destinations : %hu", assoc.sasoc_number_peer_destinations); 131 fd_log_debug( " sasoc_peer_rwnd : %u" , assoc.sasoc_peer_rwnd); 132 fd_log_debug( " sasoc_local_rwnd : %u" , assoc.sasoc_local_rwnd); 133 fd_log_debug( " sasoc_cookie_life : %u" , assoc.sasoc_cookie_life); 134 134 } 135 135 … … 143 143 /* Check new values */ 144 144 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_ASSOCINFO, &assoc, &sz) ); 145 fd_log_debug( "New SCTP_ASSOCINFO : sasoc_asocmaxrxt : %hu \n", assoc.sasoc_asocmaxrxt);146 fd_log_debug( " sasoc_number_peer_destinations : %hu \n", assoc.sasoc_number_peer_destinations);147 fd_log_debug( " sasoc_peer_rwnd : %u \n" , assoc.sasoc_peer_rwnd);148 fd_log_debug( " sasoc_local_rwnd : %u \n" , assoc.sasoc_local_rwnd);149 fd_log_debug( " sasoc_cookie_life : %u \n" , assoc.sasoc_cookie_life);145 fd_log_debug( "New SCTP_ASSOCINFO : sasoc_asocmaxrxt : %hu", assoc.sasoc_asocmaxrxt); 146 fd_log_debug( " sasoc_number_peer_destinations : %hu", assoc.sasoc_number_peer_destinations); 147 fd_log_debug( " sasoc_peer_rwnd : %u" , assoc.sasoc_peer_rwnd); 148 fd_log_debug( " sasoc_local_rwnd : %u" , assoc.sasoc_local_rwnd); 149 fd_log_debug( " sasoc_cookie_life : %u" , assoc.sasoc_cookie_life); 150 150 } 151 151 } … … 171 171 return ENOTSUP; 172 172 } 173 fd_log_debug( "Def SCTP_INITMSG : sinit_num_ostreams : %hu \n", init.sinit_num_ostreams);174 fd_log_debug( " sinit_max_instreams : %hu \n", init.sinit_max_instreams);175 fd_log_debug( " sinit_max_attempts : %hu \n", init.sinit_max_attempts);176 fd_log_debug( " sinit_max_init_timeo : %hu \n", init.sinit_max_init_timeo);173 fd_log_debug( "Def SCTP_INITMSG : sinit_num_ostreams : %hu", init.sinit_num_ostreams); 174 fd_log_debug( " sinit_max_instreams : %hu", init.sinit_max_instreams); 175 fd_log_debug( " sinit_max_attempts : %hu", init.sinit_max_attempts); 176 fd_log_debug( " sinit_max_init_timeo : %hu", init.sinit_max_init_timeo); 177 177 } 178 178 … … 187 187 /* Check new values */ 188 188 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_INITMSG, &init, &sz) ); 189 fd_log_debug( "New SCTP_INITMSG : sinit_num_ostreams : %hu \n", init.sinit_num_ostreams);190 fd_log_debug( " sinit_max_instreams : %hu \n", init.sinit_max_instreams);191 fd_log_debug( " sinit_max_attempts : %hu \n", init.sinit_max_attempts);192 fd_log_debug( " sinit_max_init_timeo : %hu \n", init.sinit_max_init_timeo);189 fd_log_debug( "New SCTP_INITMSG : sinit_num_ostreams : %hu", init.sinit_num_ostreams); 190 fd_log_debug( " sinit_max_instreams : %hu", init.sinit_max_instreams); 191 fd_log_debug( " sinit_max_attempts : %hu", init.sinit_max_attempts); 192 fd_log_debug( " sinit_max_init_timeo : %hu", init.sinit_max_init_timeo); 193 193 } 194 194 } … … 212 212 return ENOTSUP; 213 213 } 214 fd_log_debug( "Def SO_LINGER : l_onoff : %d \n", linger.l_onoff);215 fd_log_debug( " l_linger : %d \n", linger.l_linger);214 fd_log_debug( "Def SO_LINGER : l_onoff : %d", linger.l_onoff); 215 fd_log_debug( " l_linger : %d", linger.l_linger); 216 216 } 217 217 … … 225 225 /* Check new values */ 226 226 CHECK_SYS( getsockopt(sk, SOL_SOCKET, SO_LINGER, &linger, &sz) ); 227 fd_log_debug( "New SO_LINGER : l_onoff : %d \n", linger.l_onoff);228 fd_log_debug( " l_linger : %d \n", linger.l_linger);227 fd_log_debug( "New SO_LINGER : l_onoff : %d", linger.l_onoff); 228 fd_log_debug( " l_linger : %d", linger.l_linger); 229 229 } 230 230 } … … 247 247 return ENOTSUP; 248 248 } 249 fd_log_debug( "Def SCTP_NODELAY value : %s \n", nodelay ? "true" : "false");249 fd_log_debug( "Def SCTP_NODELAY value : %s", nodelay ? "true" : "false"); 250 250 } 251 251 … … 258 258 /* Check new values */ 259 259 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_NODELAY, &nodelay, &sz) ); 260 fd_log_debug( "New SCTP_NODELAY value : %s \n", nodelay ? "true" : "false");260 fd_log_debug( "New SCTP_NODELAY value : %s", nodelay ? "true" : "false"); 261 261 } 262 262 } … … 287 287 return ENOTSUP; 288 288 } 289 fd_log_debug( "Def SCTP_DISABLE_FRAGMENTS value : %s \n", nofrag ? "true" : "false");289 fd_log_debug( "Def SCTP_DISABLE_FRAGMENTS value : %s", nofrag ? "true" : "false"); 290 290 } 291 291 … … 298 298 /* Check new values */ 299 299 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_DISABLE_FRAGMENTS, &nofrag, &sz) ); 300 fd_log_debug( "New SCTP_DISABLE_FRAGMENTS value : %s \n", nofrag ? "true" : "false");300 fd_log_debug( "New SCTP_DISABLE_FRAGMENTS value : %s", nofrag ? "true" : "false"); 301 301 } 302 302 } … … 324 324 return ENOTSUP; 325 325 } 326 fd_log_debug( "Def SCTP_PEER_ADDR_PARAMS : spp_hbinterval : %u \n", parms.spp_hbinterval);327 fd_log_debug( " spp_pathmaxrxt : %hu \n", parms.spp_pathmaxrxt);328 fd_log_debug( " spp_pathmtu : %u \n", parms.spp_pathmtu);329 fd_log_debug( " spp_flags : %x \n", parms.spp_flags);330 // fd_log_debug( " spp_ipv6_flowlabel: %u \n", parms.spp_ipv6_flowlabel);331 // fd_log_debug( " spp_ipv4_tos : %hhu \n",parms.spp_ipv4_tos);326 fd_log_debug( "Def SCTP_PEER_ADDR_PARAMS : spp_hbinterval : %u", parms.spp_hbinterval); 327 fd_log_debug( " spp_pathmaxrxt : %hu", parms.spp_pathmaxrxt); 328 fd_log_debug( " spp_pathmtu : %u", parms.spp_pathmtu); 329 fd_log_debug( " spp_flags : %x", parms.spp_flags); 330 // fd_log_debug( " spp_ipv6_flowlabel: %u", parms.spp_ipv6_flowlabel); 331 // fd_log_debug( " spp_ipv4_tos : %hhu",parms.spp_ipv4_tos); 332 332 } 333 333 … … 348 348 /* Check new values */ 349 349 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, &parms, &sz) ); 350 fd_log_debug( "New SCTP_PEER_ADDR_PARAMS : spp_hbinterval : %u \n", parms.spp_hbinterval);351 fd_log_debug( " spp_pathmaxrxt : %hu \n", parms.spp_pathmaxrxt);352 fd_log_debug( " spp_pathmtu : %u \n", parms.spp_pathmtu);353 fd_log_debug( " spp_flags : %x \n", parms.spp_flags);354 // fd_log_debug( " spp_ipv6_flowlabel: %u \n", parms.spp_ipv6_flowlabel);355 // fd_log_debug( " spp_ipv4_tos : %hhu \n",parms.spp_ipv4_tos);350 fd_log_debug( "New SCTP_PEER_ADDR_PARAMS : spp_hbinterval : %u", parms.spp_hbinterval); 351 fd_log_debug( " spp_pathmaxrxt : %hu", parms.spp_pathmaxrxt); 352 fd_log_debug( " spp_pathmtu : %u", parms.spp_pathmtu); 353 fd_log_debug( " spp_flags : %x", parms.spp_flags); 354 // fd_log_debug( " spp_ipv6_flowlabel: %u", parms.spp_ipv6_flowlabel); 355 // fd_log_debug( " spp_ipv4_tos : %hhu",parms.spp_ipv4_tos); 356 356 } 357 357 } … … 392 392 } 393 393 394 fd_log_debug( "SCTP_EVENTS : sctp_data_io_event : %hhu \n", event.sctp_data_io_event);395 fd_log_debug( " sctp_association_event : %hhu \n", event.sctp_association_event);396 fd_log_debug( " sctp_address_event : %hhu \n", event.sctp_address_event);397 fd_log_debug( " sctp_send_failure_event : %hhu \n", event.sctp_send_failure_event);398 fd_log_debug( " sctp_peer_error_event : %hhu \n", event.sctp_peer_error_event);399 fd_log_debug( " sctp_shutdown_event : %hhu \n", event.sctp_shutdown_event);400 fd_log_debug( " sctp_partial_delivery_event : %hhu \n", event.sctp_partial_delivery_event);401 fd_log_debug( " sctp_adaptation_layer_event : %hhu \n", event.sctp_adaptation_layer_event);402 // fd_log_debug( " sctp_authentication_event : %hhu \n", event.sctp_authentication_event);394 fd_log_debug( "SCTP_EVENTS : sctp_data_io_event : %hhu", event.sctp_data_io_event); 395 fd_log_debug( " sctp_association_event : %hhu", event.sctp_association_event); 396 fd_log_debug( " sctp_address_event : %hhu", event.sctp_address_event); 397 fd_log_debug( " sctp_send_failure_event : %hhu", event.sctp_send_failure_event); 398 fd_log_debug( " sctp_peer_error_event : %hhu", event.sctp_peer_error_event); 399 fd_log_debug( " sctp_shutdown_event : %hhu", event.sctp_shutdown_event); 400 fd_log_debug( " sctp_partial_delivery_event : %hhu", event.sctp_partial_delivery_event); 401 fd_log_debug( " sctp_adaptation_layer_event : %hhu", event.sctp_adaptation_layer_event); 402 // fd_log_debug( " sctp_authentication_event : %hhu", event.sctp_authentication_event); 403 403 } 404 404 } … … 421 421 return ENOTSUP; 422 422 } 423 fd_log_debug( "Def SCTP_I_WANT_MAPPED_V4_ADDR value : %s \n", v4mapped ? "true" : "false");423 fd_log_debug( "Def SCTP_I_WANT_MAPPED_V4_ADDR value : %s", v4mapped ? "true" : "false"); 424 424 } 425 425 … … 436 436 /* Check new values */ 437 437 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_I_WANT_MAPPED_V4_ADDR, &v4mapped, &sz) ); 438 fd_log_debug( "New SCTP_I_WANT_MAPPED_V4_ADDR value : %s \n", v4mapped ? "true" : "false");438 fd_log_debug( "New SCTP_I_WANT_MAPPED_V4_ADDR value : %s", v4mapped ? "true" : "false"); 439 439 } 440 440 } else { … … 467 467 return ENOTSUP; 468 468 } 469 fd_log_debug( "Def SCTP_FRAGMENT_INTERLEAVE value : %d \n", interleave);469 fd_log_debug( "Def SCTP_FRAGMENT_INTERLEAVE value : %d", interleave); 470 470 } 471 471 … … 482 482 /* Check new values */ 483 483 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_FRAGMENT_INTERLEAVE, &interleave, &sz) ); 484 fd_log_debug( "New SCTP_FRAGMENT_INTERLEAVE value : %d \n", interleave);484 fd_log_debug( "New SCTP_FRAGMENT_INTERLEAVE value : %d", interleave); 485 485 } 486 486 } … … 513 513 return ENOTSUP; 514 514 } 515 fd_log_debug( "Def SCTP_EXPLICIT_EOR value : %s \n", bool ? "true" : "false");515 fd_log_debug( "Def SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false"); 516 516 } 517 517 … … 524 524 /* Check new values */ 525 525 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &bool, &sz) ); 526 fd_log_debug( "New SCTP_EXPLICIT_EOR value : %s \n", bool ? "true" : "false");526 fd_log_debug( "New SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false"); 527 527 } 528 528 } … … 571 571 return ENOTSUP; 572 572 } 573 fd_log_debug( "Def SCTP_AUTO_ASCONF value : %s \n", asconf ? "true" : "false");573 fd_log_debug( "Def SCTP_AUTO_ASCONF value : %s", asconf ? "true" : "false"); 574 574 } 575 575 … … 583 583 /* Check new values */ 584 584 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_AUTO_ASCONF, &asconf, &sz) ); 585 fd_log_debug( "New SCTP_AUTO_ASCONF value : %s \n", asconf ? "true" : "false");585 fd_log_debug( "New SCTP_AUTO_ASCONF value : %s", asconf ? "true" : "false"); 586 586 } 587 587 } … … 746 746 int i; 747 747 ptr.sa = sar; 748 fd_log_debug("Calling sctp_bindx with the following address array: \n");748 fd_log_debug("Calling sctp_bindx with the following address array:"); 749 749 for (i = 0; i < count; i++) { 750 750 TRACE_sSA(FD_LOG_DEBUG, FULL, " - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" ); … … 774 774 CHECK_SYS( sz = sctp_getladdrs(*sock, 0, &sar) ); 775 775 776 fd_log_debug("SCTP server bound on : \n");776 fd_log_debug("SCTP server bound on :"); 777 777 for (ptr.sa = sar; sz-- > 0; ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6)) { 778 778 TRACE_sSA(FD_LOG_DEBUG, FULL, " - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" ); … … 911 911 char buf[1024]; 912 912 sSA_DUMP_NODE_SERV(buf, sizeof(buf), &status.sstat_primary.spinfo_address, NI_NUMERICHOST | NI_NUMERICSERV ); 913 fd_log_debug( "SCTP_STATUS : sstat_state : %i \n" , status.sstat_state);914 fd_log_debug( " sstat_rwnd : %u \n" , status.sstat_rwnd);915 fd_log_debug( " sstat_unackdata : %hu \n", status.sstat_unackdata);916 fd_log_debug( " sstat_penddata : %hu \n", status.sstat_penddata);917 fd_log_debug( " sstat_instrms : %hu \n", status.sstat_instrms);918 fd_log_debug( " sstat_outstrms : %hu \n", status.sstat_outstrms);919 fd_log_debug( " sstat_fragmentation_point : %u \n" , status.sstat_fragmentation_point);920 fd_log_debug( " sstat_primary.spinfo_address : %s \n" , buf);921 fd_log_debug( " sstat_primary.spinfo_state : %d \n" , status.sstat_primary.spinfo_state);922 fd_log_debug( " sstat_primary.spinfo_cwnd : %u \n" , status.sstat_primary.spinfo_cwnd);923 fd_log_debug( " sstat_primary.spinfo_srtt : %u \n" , status.sstat_primary.spinfo_srtt);924 fd_log_debug( " sstat_primary.spinfo_rto : %u \n" , status.sstat_primary.spinfo_rto);925 fd_log_debug( " sstat_primary.spinfo_mtu : %u \n" , status.sstat_primary.spinfo_mtu);913 fd_log_debug( "SCTP_STATUS : sstat_state : %i" , status.sstat_state); 914 fd_log_debug( " sstat_rwnd : %u" , status.sstat_rwnd); 915 fd_log_debug( " sstat_unackdata : %hu", status.sstat_unackdata); 916 fd_log_debug( " sstat_penddata : %hu", status.sstat_penddata); 917 fd_log_debug( " sstat_instrms : %hu", status.sstat_instrms); 918 fd_log_debug( " sstat_outstrms : %hu", status.sstat_outstrms); 919 fd_log_debug( " sstat_fragmentation_point : %u" , status.sstat_fragmentation_point); 920 fd_log_debug( " sstat_primary.spinfo_address : %s" , buf); 921 fd_log_debug( " sstat_primary.spinfo_state : %d" , status.sstat_primary.spinfo_state); 922 fd_log_debug( " sstat_primary.spinfo_cwnd : %u" , status.sstat_primary.spinfo_cwnd); 923 fd_log_debug( " sstat_primary.spinfo_srtt : %u" , status.sstat_primary.spinfo_srtt); 924 fd_log_debug( " sstat_primary.spinfo_rto : %u" , status.sstat_primary.spinfo_rto); 925 fd_log_debug( " sstat_primary.spinfo_mtu : %u" , status.sstat_primary.spinfo_mtu); 926 926 } 927 927 … … 1219 1219 sndrcv = (struct sctp_sndrcvinfo *) CMSG_DATA(hdr); 1220 1220 if (TRACE_BOOL(SCTP_LEVEL)) { 1221 fd_log_debug( "Anciliary block IPPROTO_SCTP / SCTP_SNDRCV \n");1222 fd_log_debug( " sinfo_stream : %hu \n", sndrcv->sinfo_stream);1223 fd_log_debug( " sinfo_ssn : %hu \n", sndrcv->sinfo_ssn);1224 fd_log_debug( " sinfo_flags : %hu \n", sndrcv->sinfo_flags);1225 /* fd_log_debug( " sinfo_pr_policy : %hu \n", sndrcv->sinfo_pr_policy); */1226 fd_log_debug( " sinfo_ppid : %u \n" , sndrcv->sinfo_ppid);1227 fd_log_debug( " sinfo_context : %u \n" , sndrcv->sinfo_context);1228 /* fd_log_debug( " sinfo_pr_value : %u \n" , sndrcv->sinfo_pr_value); */1229 fd_log_debug( " sinfo_tsn : %u \n" , sndrcv->sinfo_tsn);1230 fd_log_debug( " sinfo_cumtsn : %u \n" , sndrcv->sinfo_cumtsn);1221 fd_log_debug( "Anciliary block IPPROTO_SCTP / SCTP_SNDRCV"); 1222 fd_log_debug( " sinfo_stream : %hu", sndrcv->sinfo_stream); 1223 fd_log_debug( " sinfo_ssn : %hu", sndrcv->sinfo_ssn); 1224 fd_log_debug( " sinfo_flags : %hu", sndrcv->sinfo_flags); 1225 /* fd_log_debug( " sinfo_pr_policy : %hu", sndrcv->sinfo_pr_policy); */ 1226 fd_log_debug( " sinfo_ppid : %u" , sndrcv->sinfo_ppid); 1227 fd_log_debug( " sinfo_context : %u" , sndrcv->sinfo_context); 1228 /* fd_log_debug( " sinfo_pr_value : %u" , sndrcv->sinfo_pr_value); */ 1229 fd_log_debug( " sinfo_tsn : %u" , sndrcv->sinfo_tsn); 1230 fd_log_debug( " sinfo_cumtsn : %u" , sndrcv->sinfo_cumtsn); 1231 1231 } 1232 1232
Note: See TracChangeset
for help on using the changeset viewer.