Print this page
11554 Want TCP_CONGESTION socket option
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>


2022         case TCP_KEEPALIVE:             return ("TCP_KEEPALIVE");
2023         case TCP_NOTIFY_THRESHOLD:      return ("TCP_NOTIFY_THRESHOLD");
2024         case TCP_ABORT_THRESHOLD:       return ("TCP_ABORT_THRESHOLD");
2025         case TCP_CONN_NOTIFY_THRESHOLD: return ("TCP_CONN_NOTIFY_THRESHOLD");
2026         case TCP_CONN_ABORT_THRESHOLD:  return ("TCP_CONN_ABORT_THRESHOLD");
2027         case TCP_RECVDSTADDR:           return ("TCP_RECVDSTADDR");
2028         case TCP_ANONPRIVBIND:          return ("TCP_ANONPRIVBIND");
2029         case TCP_EXCLBIND:              return ("TCP_EXCLBIND");
2030         case TCP_INIT_CWND:             return ("TCP_INIT_CWND");
2031         case TCP_KEEPALIVE_THRESHOLD:   return ("TCP_KEEPALIVE_THRESHOLD");
2032         case TCP_KEEPALIVE_ABORT_THRESHOLD:
2033                 return ("TCP_KEEPALIVE_ABORT_THRESHOLD");
2034         case TCP_CORK:                  return ("TCP_CORK");
2035         case TCP_RTO_INITIAL:           return ("TCP_RTO_INITIAL");
2036         case TCP_RTO_MIN:               return ("TCP_RTO_MIN");
2037         case TCP_RTO_MAX:               return ("TCP_RTO_MAX");
2038         case TCP_LINGER2:               return ("TCP_LINGER2");
2039         case TCP_KEEPIDLE:              return ("TCP_KEEPIDLE");
2040         case TCP_KEEPCNT:               return ("TCP_KEEPCNT");
2041         case TCP_KEEPINTVL:             return ("TCP_KEEPINTVL");

2042 
2043         default:                        (void) snprintf(pri->code_buf,
2044                                             sizeof (pri->code_buf),
2045                                             "0x%lx", val);
2046                                         return (pri->code_buf);
2047         }
2048 }
2049 
2050 
2051 const char *
2052 sctp_optname(private_t *pri, long val)
2053 {
2054         switch (val) {
2055         case SCTP_RTOINFO:              return ("SCTP_RTOINFO");
2056         case SCTP_ASSOCINFO:            return ("SCTP_ASSOCINFO");
2057         case SCTP_INITMSG:              return ("SCTP_INITMSG");
2058         case SCTP_NODELAY:              return ("SCTP_NODELAY");
2059         case SCTP_AUTOCLOSE:            return ("SCTP_AUTOCLOSE");
2060         case SCTP_SET_PEER_PRIMARY_ADDR:
2061                 return ("SCTP_SET_PEER_PRIMARY_ADDR");




2022         case TCP_KEEPALIVE:             return ("TCP_KEEPALIVE");
2023         case TCP_NOTIFY_THRESHOLD:      return ("TCP_NOTIFY_THRESHOLD");
2024         case TCP_ABORT_THRESHOLD:       return ("TCP_ABORT_THRESHOLD");
2025         case TCP_CONN_NOTIFY_THRESHOLD: return ("TCP_CONN_NOTIFY_THRESHOLD");
2026         case TCP_CONN_ABORT_THRESHOLD:  return ("TCP_CONN_ABORT_THRESHOLD");
2027         case TCP_RECVDSTADDR:           return ("TCP_RECVDSTADDR");
2028         case TCP_ANONPRIVBIND:          return ("TCP_ANONPRIVBIND");
2029         case TCP_EXCLBIND:              return ("TCP_EXCLBIND");
2030         case TCP_INIT_CWND:             return ("TCP_INIT_CWND");
2031         case TCP_KEEPALIVE_THRESHOLD:   return ("TCP_KEEPALIVE_THRESHOLD");
2032         case TCP_KEEPALIVE_ABORT_THRESHOLD:
2033                 return ("TCP_KEEPALIVE_ABORT_THRESHOLD");
2034         case TCP_CORK:                  return ("TCP_CORK");
2035         case TCP_RTO_INITIAL:           return ("TCP_RTO_INITIAL");
2036         case TCP_RTO_MIN:               return ("TCP_RTO_MIN");
2037         case TCP_RTO_MAX:               return ("TCP_RTO_MAX");
2038         case TCP_LINGER2:               return ("TCP_LINGER2");
2039         case TCP_KEEPIDLE:              return ("TCP_KEEPIDLE");
2040         case TCP_KEEPCNT:               return ("TCP_KEEPCNT");
2041         case TCP_KEEPINTVL:             return ("TCP_KEEPINTVL");
2042         case TCP_CONGESTION:            return ("TCP_CONGESTION");
2043 
2044         default:                        (void) snprintf(pri->code_buf,
2045                                             sizeof (pri->code_buf),
2046                                             "0x%lx", val);
2047                                         return (pri->code_buf);
2048         }
2049 }
2050 
2051 
2052 const char *
2053 sctp_optname(private_t *pri, long val)
2054 {
2055         switch (val) {
2056         case SCTP_RTOINFO:              return ("SCTP_RTOINFO");
2057         case SCTP_ASSOCINFO:            return ("SCTP_ASSOCINFO");
2058         case SCTP_INITMSG:              return ("SCTP_INITMSG");
2059         case SCTP_NODELAY:              return ("SCTP_NODELAY");
2060         case SCTP_AUTOCLOSE:            return ("SCTP_AUTOCLOSE");
2061         case SCTP_SET_PEER_PRIMARY_ADDR:
2062                 return ("SCTP_SET_PEER_PRIMARY_ADDR");