/*
- * VRRPD global definitions and state machine
- * Copyright (C) 2018 Cumulus Networks, Inc.
- * Quentin Young
+ * VRRP global definitions and state machine.
+ * Copyright (C) 2018-2019 Cumulus Networks, Inc.
+ * Quentin Young
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
/*
- * VRRPD global definitions and state machine
- * Copyright (C) 2018 Cumulus Networks, Inc.
- * Quentin Young
+ * VRRP global definitions and state machine.
+ * Copyright (C) 2018-2019 Cumulus Networks, Inc.
+ * Quentin Young
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* 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
*/
-#ifndef _VRRP_H
-#define _VRRP_H
+#ifndef __VRRP_H__
+#define __VRRP_H__
#include <zebra.h>
#include <netinet/ip.h>
*/
struct vrrp_vrouter *vrrp_lookup(uint8_t vrid);
-#endif /* _VRRP_H */
+#endif /* __VRRP_H__ */
/*
- * VRRP ARP primitives.
- *
+ * VRRP ARP handling.
* Copyright (C) 2001-2017 Alexandre Cassen
* Portions:
- * Copyright (C) 2018 Cumulus Networks
- * Quentin Young
+ * Copyright (C) 2018-2019 Cumulus Networks, Inc.
+ * Quentin Young
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* 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>
-#include <net/if_arp.h>
#include <linux/if_packet.h>
+#include <net/if_arp.h>
#include <netinet/if_ether.h>
#include "lib/if.h"
/*
- * VRRPD global definitions
- * Copyright (C) 2018 Cumulus Networks, Inc.
- * Quentin Young
+ * VRRP ARP handling.
+ * Copyright (C) 2018-2019 Cumulus Networks, Inc.
+ * Quentin Young
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* 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
+ * 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
*/
-#ifndef _VRRP_ARP_H
-#define _VRRP_ARP_H
+#ifndef __VRRP_ARP_H__
+#define __VRRP_ARP_H__
#include <zebra.h>
/* FIXME: Use the kernel define for this */
#define HWTYPE_ETHER 1
-/* prototypes */
extern void vrrp_garp_init(void);
extern void vrrp_garp_fini(void);
extern bool vrrp_garp_is_init(void);
extern void vrrp_garp_send(struct vrrp_router *vr, struct in_addr *v4);
extern void vrrp_garp_send_all(struct vrrp_router *vr);
-#endif
+
+#endif /* __VRRP_ARP_H__ */
/*
- * VRRP
- * Copyright (C) 2018 Cumulus Networks, Inc.
- * Quentin Young
+ * VRRP entry point.
+ * Copyright (C) 2018-2019 Cumulus Networks, Inc.
+ * Quentin Young
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
#include <zebra.h>
#include <lib/version.h>
-#include "getopt.h"
-#include "thread.h"
-#include "command.h"
-#include "log.h"
-#include "memory.h"
-#include "privs.h"
-#include "sigevent.h"
-#include "libfrr.h"
-#include "vrf.h"
-#include "nexthop.h"
-#include "filter.h"
-#include "if.h"
+
+#include "lib/command.h"
+#include "lib/filter.h"
+#include "lib/getopt.h"
+#include "lib/if.h"
+#include "lib/libfrr.h"
+#include "lib/log.h"
+#include "lib/memory.h"
+#include "lib/nexthop.h"
+#include "lib/privs.h"
+#include "lib/sigevent.h"
+#include "lib/thread.h"
+#include "lib/vrf.h"
#include "vrrp.h"
-#include "vrrp_zebra.h"
#include "vrrp_vty.h"
+#include "vrrp_zebra.h"
char backup_config_file[256];
/*
- * VRRPD memory types
- * Copyright (C) 2018 Cumulus Networks, Inc.
- * Quentin Young
+ * VRRP memory types.
+ * Copyright (C) 2018-2019 Cumulus Networks, Inc.
+ * Quentin Young
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
*/
#include <zebra.h>
#include <memory.h>
+
#include "vrrp_memory.h"
DEFINE_MGROUP(VRRP, "vrrpd")
/*
- * VRRPD memory types
- * Copyright (C) 2018 Cumulus Networks, Inc.
- * Quentin Young
+ * VRRP memory types.
+ * Copyright (C) 2018-2019 Cumulus Networks, Inc.
+ * Quentin Young
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
#ifndef __VRRP_MEMORY_H__
#define __VRRP_MEMORY_H__
-#include "memory.h"
+#include "lib/memory.h"
DECLARE_MGROUP(VRRP)
-#endif
+#endif /* __VRRP_MEMORY_H__ */
/*
* VRRP Neighbor Discovery.
* Copyright (C) 2019 Cumulus Networks, Inc.
- * Quentin Young
+ * Quentin Young
+ *
* Portions:
* Copyright (C) 2001-2017 Alexandre Cassen
*
/*
* VRRP Neighbor Discovery.
* Copyright (C) 2019 Cumulus Networks, Inc.
- * Quentin Young
+ * Quentin Young
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* 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
*/
-#ifndef _VRRP_NDISC_H
-#define _VRRP_NDISC_H
+#ifndef __VRRP_NDISC_H__
+#define __VRRP_NDISC_H__
#include <netinet/icmp6.h>
#include <netinet/in.h>
*/
extern int vrrp_ndisc_una_send_all(struct vrrp_router *r);
-#endif
+#endif /* __VRRP_NDISC_H__ */
/*
- * VRRPD packet crafting
- * Copyright (C) 2018 Cumulus Networks, Inc.
- * Quentin Young
+ * VRRP packet crafting.
+ * Copyright (C) 2018-2019 Cumulus Networks, Inc.
+ * Quentin Young
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
/*
- * VRRPD packet crafting
- * Copyright (C) 2018 Cumulus Networks, Inc.
- * Quentin Young
+ * VRRP packet crafting.
+ * Copyright (C) 2018-2019 Cumulus Networks, Inc.
+ * Quentin Young
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* 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
*/
+#ifndef __VRRP_PACKET_H__
+#define __VRRP_PACKET_H__
+
#include <zebra.h>
-#include "memory.h"
-#include "ipaddr.h"
-#include "prefix.h"
+#include "lib/ipaddr.h"
+#include "lib/memory.h"
+#include "lib/prefix.h"
#define VRRP_VERSION 3
#define VRRP_TYPE_ADVERTISEMENT 1
ssize_t vrrp_parse_datagram(int family, struct msghdr *m, size_t read,
struct vrrp_pkt **pkt, char *errmsg,
size_t errmsg_len);
+
+#endif /* __VRRP_PACKET_H__ */
/*
- * VRRP commands
- * Copyright (C) 2018 Cumulus Networks, Inc.
- * Quentin Young
+ * VRRP CLI commands.
+ * Copyright (C) 2018-2019 Cumulus Networks, Inc.
+ * Quentin Young
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
/*
- * VRRP commands
- * Copyright (C) 2018 Cumulus Networks, Inc.
- * Quentin Young
+ * VRRP CLI commands.
+ * Copyright (C) 2018-2019 Cumulus Networks, Inc.
+ * Quentin Young
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
#define __VRRP_VTY_H__
void vrrp_vty_init(void);
-#endif
+
+#endif /* __VRRP_VTY_H__ */
/*
- * Zebra interfacing
- * Copyright (C) 2018 Cumulus Networks, Inc.
- * Quentin Young
+ * VRRP Zebra interfacing.
+ * Copyright (C) 2018-2019 Cumulus Networks, Inc.
+ * Quentin Young
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
#include <zebra.h>
#include "lib/if.h"
+#include "lib/linklist.h"
#include "lib/log.h"
#include "lib/prefix.h"
-#include "lib/zclient.h"
#include "lib/vty.h"
-#include "lib/linklist.h"
+#include "lib/zclient.h"
#include "vrrp.h"
#include "vrrp_zebra.h"
/*
- * Zebra interfacing
- * Copyright (C) 2018 Cumulus Networks, Inc.
- * Quentin Young
+ * VRRP Zebra interfacing.
+ * Copyright (C) 2018-2019 Cumulus Networks, Inc.
+ * Quentin Young
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
extern void vrrp_zebra_init(void);
extern void vrrp_zebra_radv_set(struct vrrp_router *r, bool enable);
-#endif
+
+#endif /* __VRRP_ZEBRA_H__ */