]> git.proxmox.com Git - mirror_frr.git/blame - zebra/zebra_ptm.h
Zebra: Cleanup registered nexthops upon client exit
[mirror_frr.git] / zebra / zebra_ptm.h
CommitLineData
244c1cdc
DS
1/*
2 * Definitions for prescriptive topology module (PTM).
3 * Copyright (C) 1998, 99, 2000 Kunihiro Ishiguro, Toshiaki Takada
4 *
5 * This file is part of GNU Zebra.
6 *
7 * GNU Zebra is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2, or (at your option) any
10 * later version.
11 *
12 * GNU Zebra is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Zebra; see the file COPYING. If not, write to the Free
19 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 * 02111-1307, USA.
21 */
22
23#ifndef _ZEBRA_PTM_H
24#define _ZEBRA_PTM_H
25
26extern const char ZEBRA_PTM_SOCK_NAME[];
27#define ZEBRA_PTM_MAX_SOCKBUF 3200 /* 25B *128 ports */
c43ed2e4 28#define ZEBRA_PTM_SEND_MAX_SOCKBUF 512
c8ed14dd
DS
29
30/* Zebra ptm context block */
31struct zebra_ptm_cb
32{
33 int ptm_sock; /* ptm file descriptor. */
34
35 struct buffer *wb; /* Buffer of data waiting to be written to ptm. */
36
37 struct thread *t_read; /* Thread for read */
38 struct thread *t_write; /* Thread for write */
39 struct thread *t_timer; /* Thread for timer */
40
41 char *out_data;
42 char *in_data;
43 int reconnect_time;
44
45 int ptm_enable;
46 int pid;
47};
244c1cdc 48
950bd436 49#define ZEBRA_PTM_STATUS_DOWN 0
50#define ZEBRA_PTM_STATUS_UP 1
51#define ZEBRA_PTM_STATUS_UNKNOWN 2
52
244c1cdc 53void zebra_ptm_init (void);
c8ed14dd 54void zebra_ptm_finish(void);
244c1cdc
DS
55int zebra_ptm_connect (struct thread *t);
56void zebra_ptm_write (struct vty *vty);
c8ed14dd 57int zebra_ptm_get_enable_state(void);
244c1cdc 58
c43ed2e4
DS
59int zebra_ptm_bfd_dst_register (struct zserv *client, int sock, u_short length,
60 int command);
61int zebra_ptm_bfd_dst_deregister (struct zserv *client, int sock, u_short length);
950bd436 62void
63zebra_ptm_show_status(struct vty *vty, struct interface *ifp);
244c1cdc 64#endif