Blame keepalived/include/vrrp_arp.h

Packit c22fc9
/*
Packit c22fc9
 * Soft:        Keepalived is a failover program for the LVS project
Packit c22fc9
 *              <www.linuxvirtualserver.org>. It monitor & manipulate
Packit c22fc9
 *              a loadbalanced server pool using multi-layer checks.
Packit c22fc9
 *
Packit c22fc9
 * Part:        vrrp_arp.c include file.
Packit c22fc9
 *
Packit c22fc9
 * Author:      Alexandre Cassen, <acassen@linux-vs.org>
Packit c22fc9
 *
Packit c22fc9
 *              This program is distributed in the hope that it will be useful,
Packit c22fc9
 *              but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit c22fc9
 *              MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Packit c22fc9
 *              See the GNU General Public License for more details.
Packit c22fc9
 *
Packit c22fc9
 *              This program is free software; you can redistribute it and/or
Packit c22fc9
 *              modify it under the terms of the GNU General Public License
Packit c22fc9
 *              as published by the Free Software Foundation; either version
Packit c22fc9
 *              2 of the License, or (at your option) any later version.
Packit c22fc9
 *
Packit c22fc9
 * Copyright (C) 2001-2017 Alexandre Cassen, <acassen@gmail.com>
Packit c22fc9
 */
Packit c22fc9
Packit c22fc9
#ifndef _VRRP_ARP_H
Packit c22fc9
#define _VRRP_ARP_H
Packit c22fc9
Packit c22fc9
/* system includes */
Packit c22fc9
#include <sys/types.h>
Packit c22fc9
#include <linux/if_infiniband.h>
Packit c22fc9
Packit c22fc9
/* local includes */
Packit c22fc9
#include "vrrp.h"
Packit c22fc9
#include "vrrp_if.h"
Packit c22fc9
#include "vrrp_ipaddress.h"
Packit c22fc9
Packit c22fc9
typedef struct inf_arphdr {
Packit c22fc9
	unsigned short int ar_hrd;
Packit c22fc9
	unsigned short int ar_pro;
Packit c22fc9
	unsigned char      ar_hln;
Packit c22fc9
	unsigned char      ar_pln;
Packit c22fc9
	unsigned short int ar_op;
Packit c22fc9
Packit c22fc9
	/* Infiniband arp looks like this */
Packit c22fc9
	unsigned char     __ar_sha[INFINIBAND_ALEN];
Packit c22fc9
	unsigned char     __ar_sip[4];
Packit c22fc9
	unsigned char     __ar_tha[INFINIBAND_ALEN];
Packit c22fc9
	unsigned char     __ar_tip[4];
Packit c22fc9
} inf_arphdr_t;
Packit c22fc9
Packit c22fc9
typedef struct ipoib_hdr {
Packit c22fc9
	u_int16_t proto;
Packit c22fc9
	u_int16_t reserved;
Packit c22fc9
} ipoib_hdr_t;
Packit c22fc9
Packit c22fc9
/* prototypes */
Packit c22fc9
extern void gratuitous_arp_init(void);
Packit c22fc9
extern void gratuitous_arp_close(void);
Packit c22fc9
extern void send_gratuitous_arp(vrrp_t *, ip_address_t *);
Packit c22fc9
extern ssize_t send_gratuitous_arp_immediate(interface_t *, ip_address_t *);
Packit c22fc9
#endif