version 1.1.1.2, 2014/07/30 07:55:27
|
version 1.1.1.3, 2019/10/21 14:58:35
|
Line 163 sysctl_read(void)
|
Line 163 sysctl_read(void)
|
struct element *e, *e_parent = NULL; |
struct element *e, *e_parent = NULL; |
struct if_msghdr *ifm, *nextifm; |
struct if_msghdr *ifm, *nextifm; |
struct sockaddr_dl *sdl; |
struct sockaddr_dl *sdl; |
|
char info_buf[64]; |
|
|
ifm = (struct if_msghdr *) next; |
ifm = (struct if_msghdr *) next; |
if (ifm->ifm_type != RTM_IFINFO) |
if (ifm->ifm_type != RTM_IFINFO) |
Line 224 sysctl_read(void)
|
Line 225 sysctl_read(void)
|
|
|
attr_update(e, m->attrid, rx, tx, flags); |
attr_update(e, m->attrid, rx, tx, flags); |
} |
} |
|
|
|
snprintf(info_buf, sizeof(info_buf), "%ju", (uintmax_t)ifm->ifm_data.ifi_mtu); |
|
element_update_info(e, "MTU", info_buf); |
|
|
|
snprintf(info_buf, sizeof(info_buf), "%ju", (uintmax_t)ifm->ifm_data.ifi_metric); |
|
element_update_info(e, "Metric", info_buf); |
|
|
|
#if !(defined(__NetBSD__) || defined(__FreeBSD__)) |
|
snprintf(info_buf, sizeof(info_buf), "%u", ifm->ifm_data.ifi_recvquota); |
|
element_update_info(e, "RX-Quota", info_buf); |
|
|
|
snprintf(info_buf, sizeof(info_buf), "%u", ifm->ifm_data.ifi_xmitquota); |
|
element_update_info(e, "TX-Quota", info_buf); |
|
#endif |
|
|
element_notify_update(e, NULL); |
element_notify_update(e, NULL); |
element_lifesign(e, 1); |
element_lifesign(e, 1); |