]> git.puffer.fish Git - matthieu/frr.git/commitdiff
vrrpd: fix headers
authorQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 29 Jan 2019 19:59:01 +0000 (19:59 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 17 May 2019 00:27:08 +0000 (00:27 +0000)
* Add include guards where missing
* Add include guard comments where missing
* Fix copyright notices
* Sort includes

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
15 files changed:
vrrpd/vrrp.c
vrrpd/vrrp.h
vrrpd/vrrp_arp.c
vrrpd/vrrp_arp.h
vrrpd/vrrp_main.c
vrrpd/vrrp_memory.c
vrrpd/vrrp_memory.h
vrrpd/vrrp_ndisc.c
vrrpd/vrrp_ndisc.h
vrrpd/vrrp_packet.c
vrrpd/vrrp_packet.h
vrrpd/vrrp_vty.c
vrrpd/vrrp_vty.h
vrrpd/vrrp_zebra.c
vrrpd/vrrp_zebra.h

index 0c0ef9709a3b54716fcdd2bc4945e469c992e438..08517c79d11606ff53a36e32bfc123e1a2dbc09d 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * 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
index 0249b3e9af8bf487fe6e3a0e8e7f3d43ed3b39b7..d060b95dfab2a4167d7254bb5de6dea0cdb0f109 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * 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
@@ -17,8 +17,8 @@
  * 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>
@@ -335,4 +335,4 @@ int vrrp_event(struct vrrp_router *r, int event);
  */
 struct vrrp_vrouter *vrrp_lookup(uint8_t vrid);
 
-#endif /* _VRRP_H */
+#endif /* __VRRP_H__ */
index e7a037d089193fb077e46046cfc3c85e7ef21681..7e77d7df13eb5efe637fec0cb36a2e6891e63774 100644 (file)
@@ -1,10 +1,9 @@
 /*
- * 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"
index 1de94a15191b42272366d1df04ad452f8b992548..21f2c4edd1363f00d0e50bad627124477136c69b 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * 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__ */
index d60f37d8fc92682965b760e5e0c85e7ad8fc22d2..daaadffab5f6c5234e016aa298b84715b0e2e0ce 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * 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];
 
index 4a7c0b7e42c44d6b472b153ec69875a8c92ea72c..9ce7c90413ab2f1db114dec3c2627f12edeef264 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * 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
@@ -19,6 +19,7 @@
  */
 #include <zebra.h>
 #include <memory.h>
+
 #include "vrrp_memory.h"
 
 DEFINE_MGROUP(VRRP, "vrrpd")
index f57a864804921a431e1c4a46fc788adc17005f3d..ae6975478dd3e57b46c7d293e07a26899fb3266c 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * 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
@@ -20,8 +20,8 @@
 #ifndef __VRRP_MEMORY_H__
 #define __VRRP_MEMORY_H__
 
-#include "memory.h"
+#include "lib/memory.h"
 
 DECLARE_MGROUP(VRRP)
 
-#endif
+#endif /* __VRRP_MEMORY_H__ */
index ce6c62c07ed23490748de3f8295e76a606005a79..73ee172aa85fc197f1120dd06422289e7d93f59e 100644 (file)
@@ -1,7 +1,8 @@
 /*
  * VRRP Neighbor Discovery.
  * Copyright (C) 2019 Cumulus Networks, Inc.
- *               Quentin Young
+ * Quentin Young
+ *
  * Portions:
  *     Copyright (C) 2001-2017 Alexandre Cassen
  *
index 262d3db038a1f17ee5a77c6f3e9fdac9ec3d7ab4..efbef348d096e02af92a4c8c4d7523b5d4a85c76 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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
@@ -17,8 +17,8 @@
  * 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>
@@ -71,4 +71,4 @@ extern int vrrp_ndisc_una_send(struct vrrp_router *r, struct ipaddr *ip);
  */
 extern int vrrp_ndisc_una_send_all(struct vrrp_router *r);
 
-#endif
+#endif /* __VRRP_NDISC_H__ */
index bf1197422ea2622054fc37972d4554f59f385947..fd0256d6e3871f4200cf6d11f3842f3462173f76 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * 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
index 3a5b161fb7cc4b0aee535b7bdee2781eed24377c..df43ee76045e5416b058796fd2e3b1b8aafe6073 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * 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
@@ -170,3 +173,5 @@ size_t vrrp_pkt_dump(char *buf, size_t buflen, struct vrrp_pkt *pkt);
 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__ */
index 553e3947be3792facef70e526e150d1c13d2c8f8..ff8f1e68e696b8b07893a367a1acd2dad0fc818d 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * 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
index 2aa47ec20d3bcacb084091544020b90e36de42ed..377321ec4a383156165bb4a476b5c5d0d54acd09 100644 (file)
@@ -1,7 +1,8 @@
 /*
- * 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)
@@ -20,4 +21,5 @@
 #define __VRRP_VTY_H__
 
 void vrrp_vty_init(void);
-#endif
+
+#endif /* __VRRP_VTY_H__ */
index 1c4b0a3828ec0fc4e99ecf8ea03adba451fb3813..1bd5aa013f979f02b78fc83e164c495bc0b30bac 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * 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"
index 70871cd89bab1f3efea7e8edd62be4a1fb1911cf..5e8ff095437b6e46ab6a6178d0b09b28d1c43dad 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * 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
@@ -22,4 +22,5 @@
 
 extern void vrrp_zebra_init(void);
 extern void vrrp_zebra_radv_set(struct vrrp_router *r, bool enable);
-#endif
+
+#endif /* __VRRP_ZEBRA_H__ */