]> git.proxmox.com Git - mirror_frr.git/blobdiff - isisd/isis_dlpi.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / isisd / isis_dlpi.c
index bb8c54259768e97a57b17320ee42c2e7e21e7fed..1f091524b6611a4bec274e4c292282f6f37dfcc4 100644 (file)
@@ -1,23 +1,10 @@
+// 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>
@@ -336,9 +323,8 @@ static int open_dlpi_dev(struct isis_circuit *circuit)
 
                /* 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;
                }
@@ -355,9 +341,8 @@ static int open_dlpi_dev(struct isis_circuit *circuit)
        } 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;
                }
@@ -404,9 +389,8 @@ static int open_dlpi_dev(struct isis_circuit *circuit)
         * 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;
        }
@@ -479,7 +463,7 @@ int isis_sock_init(struct isis_circuit *circuit)
                        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;
                }
@@ -511,7 +495,7 @@ int isis_recv_pdu_bcast(struct isis_circuit *circuit, uint8_t *ssnpa)
        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;
        }
@@ -561,8 +545,9 @@ int isis_send_pdu_bcast(struct isis_circuit *circuit, int level)
        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;
        }