1 /* Guile bgp interface.
2 Copyright (C) 1999 Kunihiro Ishiguro
4 This file is part of GNU Zebra.
6 GNU Zebra is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 GNU Zebra is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Zebra; see the file COPYING. If not, write to the Free
18 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25 #include "bgpd/bgpd.h"
27 /* static SCM scm_mark_bgp (SCM obj); */
28 static size_t scm_free_bgp (SCM vect
);
29 static int scm_print_bgp (SCM vect
, SCM port
, scm_print_state
*pstate
);
30 static SCM
scm_equalp_bgp (SCM a
, SCM b
);
32 /* Tag of scheme type of bgp. */
35 static scm_smobfuns bgp_funs
=
37 scm_mark0
, scm_free_bgp
, scm_print_bgp
, scm_equalp_bgp
41 scm_print_bgp (SCM vect
, SCM port
, scm_print_state
*pstate
)
47 bgp
= (struct bgp
*) SCM_CDR (vect
);
49 scm_puts ("#<bgp ", port
);
50 scm_intprint (num
, 10, port
);
56 scm_free_bgp (SCM obj
)
63 scm_equalp_bgp (SCM a
, SCM b
)
69 /* Make bgp instance. */
71 scm_router_bgp (SCM as_number
)
76 struct bgp
*bgp_create ();
78 SCM_ASSERT (SCM_INUMP (as_number
), as_number
, SCM_ARG1
, "router-bgp");
82 num
= gh_scm2long (as_number
);
84 /* Make new bgp object. */
89 SCM_SETCAR (cell
, scm_tag_bgp
);
90 SCM_SETCDR (cell
, bgp
);
99 scm_router_bgp_list ()
113 scm_tag_bgp
= scm_newsmob (&bgp_funs
);
115 gh_new_procedure ("router-bgp", scm_router_bgp
, 1, 0, 0);
116 /* gh_new_procedure ("router-bgp-list", scm_router_bgp_list, 0, 0, 0); */