Annotation of embedaddon/freevrrpd/vrrp_functions.h, revision 1.1
1.1 ! misho 1: /*
! 2: * Copyright (c) 2001,2002 Sebastien Petit <spe@bsdfr.org>
! 3: *
! 4: * Redistribution and use in source forms, with and without modification,
! 5: * are permitted provided that the following conditions are met:
! 6: * 1. Redistributions of source code must retain the above copyright notice,
! 7: * this list of conditions and the following disclaimer.
! 8: * 2. Redistributions in binary form must reproduce the above copyright notice,
! 9: * this list of conditions and the following disclaimer in the documentation
! 10: * and/or other materials provided with the distribution. Obviously, it
! 11: * would be nice if you gave credit where credit is due but requiring it
! 12: * would be too onerous.
! 13: * 3. All advertising materials mentioning features or use of this software
! 14: * must display the following acknowledgement:
! 15: * This product includes software developed by Sebastien Petit.
! 16: * 4. Neither the name of its contributors may be used to endorse or promote
! 17: * products derived from this software without specific prior written
! 18: * permission.
! 19: *
! 20: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
! 21: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
! 22: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! 23: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
! 24: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
! 25: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
! 26: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
! 27: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
! 28: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
! 29: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! 30: * SUCH DAMAGE.
! 31: *
! 32: * $Id: vrrp_functions.h,v 1.8 2004/04/02 11:04:46 spe Exp $
! 33: */
! 34:
! 35: #include <net/route.h>
! 36: #include <stdio.h>
! 37:
! 38: /* vrrp_state.c functions */
! 39: char vrrp_state_initialize(struct vrrp_vr *);
! 40: char vrrp_state_set_master(struct vrrp_vr *);
! 41: char vrrp_state_set_backup(struct vrrp_vr *);
! 42: char vrrp_state_check_priority(struct vrrp_hdr *, struct vrrp_vr *, struct in_addr);
! 43: char vrrp_state_master(struct vrrp_vr *);
! 44: char vrrp_state_backup(struct vrrp_vr *);
! 45:
! 46: /* vrrp_interface.c functions */
! 47: void vrrp_interface_owner_verify(struct vrrp_vr *);
! 48: char vrrp_interface_mac_set(char *, struct ether_addr *);
! 49: int vrrp_interface_all_ethaddr_set(struct vrrp_vr *, struct ether_addr *);
! 50: char vrrp_interface_ipaddr_set(char *, struct in_addr, in_addr_t netmask);
! 51: char vrrp_interface_ipaddr_delete(char *, struct in_addr, int);
! 52: char vrrp_interface_vripaddr_set(struct vrrp_vr *);
! 53: char vrrp_interface_vripaddr_delete(struct vrrp_vr *);
! 54: char vrrp_interface_down(char *);
! 55: char vrrp_interface_up(char *);
! 56: char vrrp_interface_promiscuous(char *);
! 57: char vrrp_interface_set_flags(char *, int);
! 58: char vrrp_interface_bridge_create(struct vrrp_vr *);
! 59: int vrrp_interface_bridge_destroy(int, char *);
! 60: char vrrp_interface_bridge_addmember(int, char *, char *);
! 61:
! 62: /* vrrp_network.c functions */
! 63: char vrrp_network_open_socket(struct vrrp_vr *);
! 64: ssize_t vrrp_network_send_packet(char *, int, int, int);
! 65: u_int vrrp_network_vrrphdr_len(struct vrrp_vr *);
! 66: void vrrp_network_init_ethhdr(char *, struct vrrp_vr *);
! 67: void vrrp_network_init_iphdr(char *, struct vrrp_vr *);
! 68: void vrrp_network_init_vrrphdr(char *, struct vrrp_vr *);
! 69: char vrrp_network_send_advertisement(struct vrrp_vr *);
! 70: int vrrp_network_send_gratuitous_arp(char *, struct ether_addr *, struct in_addr);
! 71: int vrrp_network_send_gratuitous_arp_ips(struct vrrp_vr *, struct ether_addr *);
! 72: int vrrp_network_send_gratuitous_arp_ipaddrs(struct vrrp_vr *, struct ether_addr *);
! 73: char vrrp_network_delete_local_route(struct in_addr);
! 74:
! 75: /* vrrp_misc.c functions */
! 76: void rt_xaddrs(caddr_t, caddr_t, struct rt_addrinfo *);
! 77: char vrrp_misc_get_if_infos(char *, struct ether_addr *, struct in_addr *, int *);
! 78: char vrrp_misc_get_vlan_infos(struct vrrp_vr *);
! 79: int vrrp_misc_get_priority(struct vrrp_vr *);
! 80: u_int16_t vrrp_misc_compute_checksum(u_int16_t *, int);
! 81: char vrrp_misc_calcul_tminterval(struct timeval *, u_int);
! 82: char vrrp_misc_calcul_tmrelease(struct timeval *, struct timeval *);
! 83: char vrrp_misc_check_vrrp_packet(struct vrrp_vr *, char *, ssize_t);
! 84: void vrrp_misc_quit(int);
! 85: struct vrrp_if *vrrp_misc_search_if_entry(char *);
! 86:
! 87: /* vrrp_conf.c functions */
! 88: int vrrp_conf_ident_option_arg(char *, char *, char *);
! 89: char **vrrp_conf_split_args(char *, char);
! 90: void vrrp_conf_freeargs(char **);
! 91: char vrrp_conf_lecture_fichier(struct vrrp_vr *, FILE *);
! 92: FILE *vrrp_conf_open_file(char *);
! 93:
! 94: /* vrrp_multicast.c functions */
! 95: char vrrp_multicast_join_group(int, u_char *, struct in_addr *);
! 96: char vrrp_multicast_set_ttl(int, u_char);
! 97: char vrrp_multicast_set_if(int, struct in_addr *, char *);
! 98: char vrrp_multicast_set_socket(struct vrrp_vr *);
! 99: char vrrp_multicast_open_socket(struct vrrp_vr *);
! 100:
! 101: /* vrrp_signal.c functions */
! 102: void vrrp_signal_initialize(void);
! 103: void vrrp_signal_quit(int);
! 104: void vrrp_signal_shutdown(int);
! 105:
! 106: /* vrrp_list.c functions */
! 107: char vrrp_list_initialize(struct vrrp_vr *, struct ether_addr *);
! 108: char vrrp_list_add(struct vrrp_vr *, struct ether_addr *);
! 109: char vrrp_list_delete(struct vrrp_vr *, struct ether_addr);
! 110: struct ether_addr vrrp_list_get_last(struct vrrp_vr *);
! 111: struct ether_addr vrrp_list_get_first(struct vrrp_vr *);
! 112:
! 113: /* vrrp_vlanlist.c functions */
! 114: char vrrp_vlanlist_initialize(struct vrrp_vr *);
! 115: char vrrp_vlanlist_add(struct vrrp_vr *, char *);
! 116: char vrrp_vlanlist_delete(struct vrrp_vr *, char *);
! 117: char *vrrp_vlanlist_get_last(struct vrrp_vr *);
! 118: char *vrrp_vlanlist_get_first(struct vrrp_vr *);
! 119:
! 120: /* vrrp_thread.c functions */
! 121: void vrrp_thread_mutex_lock(void);
! 122: void vrrp_thread_mutex_unlock(void);
! 123: void *vrrp_thread_launch_vrrprouter(void *);
! 124: char vrrp_thread_initialize(void);
! 125: char vrrp_thread_create_vrid(struct vrrp_vr *);
! 126:
! 127: /* vrrp_netgraph.c functions */
! 128: int vrrp_netgraph_bridge_create(char *);
! 129: int vrrp_netgraph_create_virtualiface(struct vrrp_vr *);
! 130: int vrrp_netgraph_shutdown(int, char *);
! 131: int vrrp_netgraph_shutdown_allnodes(void);
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>