]> git.proxmox.com Git - mirror_frr.git/blame - lib/mlag.c
Merge pull request #4155 from pguibert6WIND/bfd_increase_config
[mirror_frr.git] / lib / mlag.c
CommitLineData
6edbb8b2
DS
1/* mlag generic code.
2 * Copyright (C) 2018 Cumulus Networks, Inc.
3 * Donald Sharp
4 *
5 * This file is part of FRR.
6 *
7 * FRR is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2, or (at your option) any
10 * later version.
11 *
12 * FRR is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with FRR; see the file COPYING. If not, write to the Free
19 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 * 02111-1307, USA.
21 */
22#include <zebra.h>
23
24#include <mlag.h>
25
26char *mlag_role2str(enum mlag_role role, char *buf, size_t size)
27{
28 switch (role) {
29 case MLAG_ROLE_NONE:
30 snprintf(buf, size, "NONE");
31 break;
32 case MLAG_ROLE_PRIMARY:
33 snprintf(buf, size, "PRIMARY");
34 break;
35 case MLAG_ROLE_SECONDARY:
36 snprintf(buf, size, "SECONDARY");
37 break;
38 }
39
40 return buf;
41}