+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* IS-IS Rout(e)ing protocol - isis_dlpi.c
*
* Copyright (C) 2001,2002 Sampo Saaristo
* Tampere University of Technology
* Institute of Communications Engineering
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public Licenseas published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
/* 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;
}