Blame keepalived/include/check_bfd.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:        check_bfd.c include file.
Packit c22fc9
 *
Packit c22fc9
 * Author:      Quentin Armitage <quentin@armitage.org.uk>
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 _CHECK_BFD_H
Packit c22fc9
#define _CHECK_BFD_H
Packit c22fc9
Packit c22fc9
#include "scheduler.h"
Packit c22fc9
#include "check_data.h"
Packit c22fc9
Packit c22fc9
/* external bfd we read to track forwarding to remote systems */
Packit c22fc9
typedef struct _checker_bfd {
Packit c22fc9
	char			*bname;		/* bfd name */
Packit c22fc9
//	int			weight;		/* Default weight */
Packit c22fc9
	list			tracking_rs;	/* List of checker_t */
Packit c22fc9
} checker_tracked_bfd_t;
Packit c22fc9
Packit c22fc9
///* List structure from bfds to tracking rs */
Packit c22fc9
//typedef struct _tracking_checker_bfd {
Packit c22fc9
////	int			weight;		/* Tracking weight, or zero for down instance */
Packit c22fc9
//	checker_t		*checker;	/* The real server */
Packit c22fc9
//} tracking_rs_t;
Packit c22fc9
Packit c22fc9
///* Tracked bfd structure definition */
Packit c22fc9
//typedef struct _tracked_bfd {
Packit c22fc9
//	checker_tracked_bfd_t	*bfd;		/* track bfd pointer, cannot be NULL */
Packit c22fc9
////	int			weight;		/* Weight for bfd */
Packit c22fc9
//} tracked_bfd_t;
Packit c22fc9
Packit c22fc9
/* bfd_checker structure */
Packit c22fc9
typedef struct _bfd_checker {
Packit c22fc9
	checker_tracked_bfd_t	*bfd;		/* track bfd pointer, cannot be NULL */
Packit c22fc9
//	int			weight;		// Set in bfd_weight_handler
Packit c22fc9
} bfd_checker_t;
Packit c22fc9
Packit c22fc9
/* Prototypes defs */
Packit c22fc9
extern void install_bfd_check_keyword(void);
Packit c22fc9
extern void start_bfd_monitoring(thread_master_t *);
Packit c22fc9
extern void checker_bfd_dispatcher_release(void);
Packit c22fc9
#ifdef THREAD_DUMP
Packit c22fc9
extern void register_check_bfd_addresses(void);
Packit c22fc9
#endif
Packit c22fc9
Packit c22fc9
#endif