struct listnode *node;
if (!list) {
- zlog_warn("isis_adj_build_neigh_list(): NULL list");
+ zlog_warn("%s: NULL list", __func__);
return;
}
for (ALL_LIST_ELEMENTS_RO(adjdb, node, adj)) {
if (!adj) {
- zlog_warn("isis_adj_build_neigh_list(): NULL adj");
+ zlog_warn("%s: NULL adj", __func__);
return;
}
struct listnode *node;
if (adjdb == NULL) {
- zlog_warn("isis_adj_build_up_list(): adjacency DB is empty");
+ zlog_warn("%s: adjacency DB is empty", __func__);
return;
}
if (!list) {
- zlog_warn("isis_adj_build_up_list(): NULL list");
+ zlog_warn("%s: NULL list", __func__);
return;
}
for (ALL_LIST_ELEMENTS_RO(adjdb, node, adj)) {
if (!adj) {
- zlog_warn("isis_adj_build_up_list(): NULL adj");
+ zlog_warn("%s: NULL adj", __func__);
return;
}
bpf_prog.bf_len = 8;
bpf_prog.bf_insns = &(llcfilter[0]);
if (ioctl(fd, BIOCSETF, (caddr_t)&bpf_prog) < 0) {
- zlog_warn("open_bpf_dev(): failed to install filter: %s",
+ zlog_warn("%s: failed to install filter: %s", __func__,
safe_strerror(errno));
return ISIS_WARNING;
}
circuit->tx = isis_send_pdu_bcast;
circuit->rx = isis_recv_pdu_bcast;
} else {
- zlog_warn("isis_sock_init(): unknown circuit type");
+ zlog_warn("%s: unknown circuit type", __func__);
retval = ISIS_WARNING;
break;
}
bytesread = read(circuit->fd, readbuff, readblen);
}
if (bytesread < 0) {
- zlog_warn("isis_recv_pdu_bcast(): read() failed: %s",
- safe_strerror(errno));
+ zlog_warn("%s: read() failed: %s", __func__,
+ safe_strerror(errno));
return ISIS_WARNING;
}
buflen = stream_get_endp(circuit->snd_stream) + LLC_LEN + ETHER_HDR_LEN;
if (buflen > sizeof(sock_buff)) {
zlog_warn(
- "isis_send_pdu_bcast: sock_buff size %zu is less than output pdu size %zu on circuit %s",
- sizeof(sock_buff), buflen, circuit->interface->name);
+ "%s: sock_buff size %zu is less than output pdu size %zu on circuit %s",
+ __func__, sizeof(sock_buff), buflen,
+ circuit->interface->name);
return ISIS_WARNING;
}
} else {
/* It's normal in case of loopback etc. */
if (IS_DEBUG_EVENTS)
- zlog_debug("isis_circuit_if_add: unsupported media");
+ zlog_debug("%s: unsupported media", __func__);
circuit->circ_type = CIRCUIT_T_UNKNOWN;
}
}
#ifdef EXTREME_DEGUG
if (IS_DEBUG_EVENTS)
- zlog_debug(
- "isis_circuit_if_add: if_id %d, isomtu %d snpa %s",
- circuit->interface->ifindex, ISO_MTU(circuit),
- snpa_print(circuit->u.bc.snpa));
+ zlog_debug("%s: if_id %d, isomtu %d snpa %s", __func__,
+ circuit->interface->ifindex,
+ ISO_MTU(circuit),
+ snpa_print(circuit->u.bc.snpa));
#endif /* EXTREME_DEBUG */
circuit->u.bc.adjdb[0] = list_new();
/* Double check the DLPI style */
if (dia->dl_provider_style != DL_STYLE2) {
- zlog_warn(
- "open_dlpi_dev(): interface %s: %s is not style 2",
- circuit->interface->name, devpath);
+ zlog_warn("%s: interface %s: %s is not style 2",
+ __func__, circuit->interface->name, devpath);
close(fd);
return ISIS_WARNING;
}
} else {
/* Double check the DLPI style */
if (dia->dl_provider_style != DL_STYLE1) {
- zlog_warn(
- "open_dlpi_dev(): interface %s: %s is not style 1",
- circuit->interface->name, devpath);
+ zlog_warn("%s: interface %s: %s is not style 1",
+ __func__, circuit->interface->name, devpath);
close(fd);
return ISIS_WARNING;
}
* so we need to be careful and use DL_PHYS_ADDR_REQ instead.
*/
if (dlpiaddr(fd, circuit->u.bc.snpa) == -1) {
- zlog_warn(
- "open_dlpi_dev(): interface %s: unable to get MAC address",
- circuit->interface->name);
+ zlog_warn("%s: interface %s: unable to get MAC address",
+ __func__, circuit->interface->name);
close(fd);
return ISIS_WARNING;
}
circuit->tx = isis_send_pdu_bcast;
circuit->rx = isis_recv_pdu_bcast;
} else {
- zlog_warn("isis_sock_init(): unknown circuit type");
+ zlog_warn("%s: unknown circuit type", __func__);
retval = ISIS_WARNING;
break;
}
retv = getmsg(circuit->fd, &ctlbuf, &databuf, &flags);
if (retv < 0) {
- zlog_warn("isis_recv_pdu_bcast: getmsg failed: %s",
+ zlog_warn("%s: getmsg failed: %s", __func__,
safe_strerror(errno));
return ISIS_WARNING;
}
buflen = stream_get_endp(circuit->snd_stream) + LLC_LEN;
if ((size_t)buflen > sizeof(sock_buff)) {
zlog_warn(
- "isis_send_pdu_bcast: sock_buff size %zu is less than output pdu size %d on circuit %s",
- sizeof(sock_buff), buflen, circuit->interface->name);
+ "%s: sock_buff size %zu is less than output pdu size %d on circuit %s",
+ __func__, sizeof(sock_buff), buflen,
+ circuit->interface->name);
return ISIS_WARNING;
}
}
if (circuit->u.bc.run_dr_elect[level - 1])
- zlog_warn("isis_run_dr(): run_dr_elect already set for l%d", level);
+ zlog_warn("%s: run_dr_elect already set for l%d", __func__,
+ level);
circuit->u.bc.t_run_dr[level - 1] = NULL;
circuit->u.bc.run_dr_elect[level - 1] = 1;
adjdb = circuit->u.bc.adjdb[level - 1];
if (!adjdb) {
- zlog_warn("isis_dr_elect() adjdb == NULL");
+ zlog_warn("%s adjdb == NULL", __func__);
list_delete(&list);
return ISIS_WARNING;
}
}
if (cmp_res == 0)
zlog_warn(
- "isis_dr_elect(): multiple adjacencies with same SNPA");
+ "%s: multiple adjacencies with same SNPA",
+ __func__);
} else {
adj_dr = adj;
}
uint8_t id[ISIS_SYS_ID_LEN + 2];
if (IS_DEBUG_EVENTS)
- zlog_debug("isis_dr_resign l%d", level);
+ zlog_debug("%s l%d", __func__, level);
circuit->u.bc.is_dr[level - 1] = 0;
circuit->u.bc.run_dr_elect[level - 1] = 0;
uint8_t old_dr[ISIS_SYS_ID_LEN + 2];
if (IS_DEBUG_EVENTS)
- zlog_debug("isis_dr_commence l%d", level);
+ zlog_debug("%s l%d", __func__, level);
/* Lets keep a pause in DR election */
circuit->u.bc.run_dr_elect[level - 1] = 0;