status: Indicate SCTP connections and listeners in status web
This commit is contained in:
parent
895e13eb39
commit
51effcfad5
|
|
@ -1590,7 +1590,10 @@ int accept_listener_status(cJSON *listeners, cJSON *totals)
|
|||
cJSON_AddNumberToObject(jl, "fd", l->fd);
|
||||
cJSON_AddNumberToObject(jl, "id", l->id);
|
||||
cJSON_AddStringToObject(jl, "name", l->name);
|
||||
cJSON_AddStringToObject(jl, "proto", (l->udp) ? "udp" : "tcp");
|
||||
if (l->ai_protocol == IPPROTO_SCTP)
|
||||
cJSON_AddStringToObject(jl, "proto", "sctp");
|
||||
else
|
||||
cJSON_AddStringToObject(jl, "proto", (l->udp) ? "udp" : "tcp");
|
||||
cJSON_AddStringToObject(jl, "addr", l->addr_s);
|
||||
if (l->filter_s)
|
||||
cJSON_AddStringToObject(jl, "filter", l->filter_s);
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@
|
|||
<tr ng-repeat="c in status.uplinks">
|
||||
<td class='username'>{{ c.username }}</td>
|
||||
<td><a ng-href="{{ server_status_href(c) }}">{{ c.addr_rem }}</a></td>
|
||||
<td>{{ c.mode }}</td>
|
||||
<td>{{ c.mode }} <span ng-show="c.proto == 'sctp'">SCTP</span></td>
|
||||
<td>{{ c.t_connect | datetime }}</td>
|
||||
<td>{{ c.since_connect | duration }}</td>
|
||||
<td>{{ c.since_last_read | duration }}</td>
|
||||
|
|
@ -212,6 +212,7 @@
|
|||
<td><a ng-show="linkable(c)" ng-href="{{ server_status_href(c) }}">{{ c.addr_rem }}</a>
|
||||
<span ng-show="!linkable(c)">{{ c.addr_rem }}</span>
|
||||
<span ng-show="c.udp_downstream">+UDP</span>
|
||||
<span ng-show="c.proto == 'sctp'">SCTP</span>
|
||||
</td>
|
||||
<td><span ng-show='c.verified == 0' class='red'>No</span>
|
||||
<span ng-show='c.verified == 1'>Yes</span>
|
||||
|
|
|
|||
|
|
@ -2116,8 +2116,8 @@ static struct cJSON *worker_client_json(struct client_t *c, int liveup_info)
|
|||
if (c->ibuf_end > 0) {
|
||||
s = hex_encode(c->ibuf, c->ibuf_end);
|
||||
cJSON_AddStringToObject(jc, "ibuf", s);
|
||||
hlog(LOG_DEBUG, "Encoded ibuf %d bytes: '%.*s'", c->ibuf_end, c->ibuf_end, c->ibuf);
|
||||
hlog(LOG_DEBUG, "Hex: %s", s);
|
||||
//hlog(LOG_DEBUG, "Encoded ibuf %d bytes: '%.*s'", c->ibuf_end, c->ibuf_end, c->ibuf);
|
||||
//hlog(LOG_DEBUG, "Hex: %s", s);
|
||||
hfree(s);
|
||||
}
|
||||
|
||||
|
|
@ -2193,6 +2193,9 @@ static struct cJSON *worker_client_json(struct client_t *c, int liveup_info)
|
|||
|
||||
cJSON_AddStringToObject(jc, "mode", mode);
|
||||
}
|
||||
|
||||
if (c->ai_protocol == IPPROTO_SCTP)
|
||||
cJSON_AddStringToObject(jc, "proto", "sctp");
|
||||
|
||||
#ifdef USE_SSL
|
||||
if (c->cert_subject[0])
|
||||
|
|
|
|||
Loading…
Reference in New Issue