version 1.1.1.2, 2013/07/21 23:54:40
|
version 1.1.1.3, 2016/11/02 10:09:12
|
Line 23
|
Line 23
|
#include <zebra.h> |
#include <zebra.h> |
|
|
#ifdef SUPPORT_OSPF_API |
#ifdef SUPPORT_OSPF_API |
#ifndef HAVE_OPAQUE_LSA |
|
#error "Core Opaque-LSA module must be configured." |
|
#endif /* HAVE_OPAQUE_LSA */ |
|
|
|
#include "linklist.h" |
#include "linklist.h" |
#include "prefix.h" |
#include "prefix.h" |
Line 244 static int
|
Line 241 static int
|
ospf_apiserver_new_lsa_hook (struct ospf_lsa *lsa) |
ospf_apiserver_new_lsa_hook (struct ospf_lsa *lsa) |
{ |
{ |
if (IS_DEBUG_OSPF_EVENT) |
if (IS_DEBUG_OSPF_EVENT) |
zlog_debug ("API: Put LSA(%p)[%s] into reserve, total=%ld", lsa, dump_lsa_key (lsa), lsa->lsdb->total); | zlog_debug ("API: Put LSA(%p)[%s] into reserve, total=%ld", (void *)lsa, |
| dump_lsa_key (lsa), lsa->lsdb->total); |
return 0; |
return 0; |
} |
} |
|
|
Line 252 static int
|
Line 250 static int
|
ospf_apiserver_del_lsa_hook (struct ospf_lsa *lsa) |
ospf_apiserver_del_lsa_hook (struct ospf_lsa *lsa) |
{ |
{ |
if (IS_DEBUG_OSPF_EVENT) |
if (IS_DEBUG_OSPF_EVENT) |
zlog_debug ("API: Get LSA(%p)[%s] from reserve, total=%ld", lsa, dump_lsa_key (lsa), lsa->lsdb->total); | zlog_debug ("API: Get LSA(%p)[%s] from reserve, total=%ld", (void *)lsa, |
| dump_lsa_key (lsa), lsa->lsdb->total); |
return 0; |
return 0; |
} |
} |
|
|
Line 395 ospf_apiserver_free (struct ospf_apiserver *apiserv)
|
Line 394 ospf_apiserver_free (struct ospf_apiserver *apiserv)
|
listnode_delete (apiserver_list, apiserv); |
listnode_delete (apiserver_list, apiserv); |
|
|
if (IS_DEBUG_OSPF_EVENT) |
if (IS_DEBUG_OSPF_EVENT) |
zlog_debug ("API: Delete apiserv(%p), total#(%d)", apiserv, apiserver_list->count); | zlog_debug ("API: Delete apiserv(%p), total#(%d)", |
| (void *)apiserv, apiserver_list->count); |
|
|
/* And free instance. */ |
/* And free instance. */ |
XFREE (MTYPE_OSPF_APISERVER, apiserv); |
XFREE (MTYPE_OSPF_APISERVER, apiserv); |
Line 755 ospf_apiserver_accept (struct thread *thread)
|
Line 755 ospf_apiserver_accept (struct thread *thread)
|
#endif /* USE_ASYNC_READ */ |
#endif /* USE_ASYNC_READ */ |
|
|
if (IS_DEBUG_OSPF_EVENT) |
if (IS_DEBUG_OSPF_EVENT) |
zlog_debug ("API: New apiserv(%p), total#(%d)", apiserv, apiserver_list->count); | zlog_debug ("API: New apiserv(%p), total#(%d)", |
| (void *)apiserv, apiserver_list->count); |
|
|
return 0; |
return 0; |
} |
} |
Line 944 ospf_apiserver_register_opaque_type (struct ospf_apise
|
Line 945 ospf_apiserver_register_opaque_type (struct ospf_apise
|
if (IS_DEBUG_OSPF_EVENT) |
if (IS_DEBUG_OSPF_EVENT) |
zlog_debug ("API: Add LSA-type(%d)/Opaque-type(%d) into" |
zlog_debug ("API: Add LSA-type(%d)/Opaque-type(%d) into" |
" apiserv(%p), total#(%d)", |
" apiserv(%p), total#(%d)", |
lsa_type, opaque_type, apiserv, | lsa_type, opaque_type, (void *)apiserv, |
listcount (apiserv->opaque_types)); |
listcount (apiserv->opaque_types)); |
|
|
return 0; |
return 0; |
Line 976 ospf_apiserver_unregister_opaque_type (struct ospf_api
|
Line 977 ospf_apiserver_unregister_opaque_type (struct ospf_api
|
if (IS_DEBUG_OSPF_EVENT) |
if (IS_DEBUG_OSPF_EVENT) |
zlog_debug ("API: Del LSA-type(%d)/Opaque-type(%d)" |
zlog_debug ("API: Del LSA-type(%d)/Opaque-type(%d)" |
" from apiserv(%p), total#(%d)", |
" from apiserv(%p), total#(%d)", |
lsa_type, opaque_type, apiserv, | lsa_type, opaque_type, (void *)apiserv, |
listcount (apiserv->opaque_types)); |
listcount (apiserv->opaque_types)); |
|
|
return 0; |
return 0; |