ospf_xif.cc

来自「BCAST Implementation for NS2」· CC 代码 · 共 2,721 行 · 第 1/5 页

CC
2,721
字号
/* * Copyright (c) 2001-2003 International Computer Science Institute * See LICENSE file for licensing, conditions, and warranties on use. * * DO NOT EDIT THIS FILE - IT IS PROGRAMMATICALLY GENERATED * * Generated by 'clnt-gen'. */#ident "$XORP: xorp/xrl/interfaces/ospf_xif.cc,v 1.7 2003/08/07 04:52:27 hodson Exp $"#include "ospf_xif.hh"boolXrlOspfV0p1Client::send_set_router_id(	const char*	the_tgt, 	const uint32_t&	id, 	const SetRouterIdCB&	cb){    Xrl x(the_tgt, "ospf/0.1/set_router_id");    x.args().add("id", id);    return _sender->send(x, callback(this, &XrlOspfV0p1Client::unmarshall_set_router_id, cb));}/* Unmarshall set_router_id */voidXrlOspfV0p1Client::unmarshall_set_router_id(	const XrlError&	e, 	XrlArgs*	a, 	SetRouterIdCB		cb){    if (e != XrlError::OKAY()) {	cb->dispatch(e);	return;    } else if (a && a->size() != 0) {	XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size());	cb->dispatch(XrlError::BAD_ARGS());	return;    }    cb->dispatch(e);}boolXrlOspfV0p1Client::send_get_router_id(	const char*	the_tgt, 	const GetRouterIdCB&	cb){    Xrl x(the_tgt, "ospf/0.1/get_router_id");    return _sender->send(x, callback(this, &XrlOspfV0p1Client::unmarshall_get_router_id, cb));}/* Unmarshall get_router_id */voidXrlOspfV0p1Client::unmarshall_get_router_id(	const XrlError&	e, 	XrlArgs*	a, 	GetRouterIdCB		cb){    if (e != XrlError::OKAY()) {	cb->dispatch(e, 0);	return;    } else if (a && a->size() != 1) {	XLOG_ERROR("Wrong number of arguments (%u != 1)", (uint32_t)a->size());	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    uint32_t id;    try {	a->get("id", id);    } catch (const XrlArgs::XrlAtomNotFound&) {	XLOG_ERROR("Atom not found");	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    cb->dispatch(e, &id);}boolXrlOspfV0p1Client::send_set_lsdb_limit(	const char*	the_tgt, 	const int32_t&	limit, 	const SetLsdbLimitCB&	cb){    Xrl x(the_tgt, "ospf/0.1/set_lsdb_limit");    x.args().add("limit", limit);    return _sender->send(x, callback(this, &XrlOspfV0p1Client::unmarshall_set_lsdb_limit, cb));}/* Unmarshall set_lsdb_limit */voidXrlOspfV0p1Client::unmarshall_set_lsdb_limit(	const XrlError&	e, 	XrlArgs*	a, 	SetLsdbLimitCB		cb){    if (e != XrlError::OKAY()) {	cb->dispatch(e);	return;    } else if (a && a->size() != 0) {	XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size());	cb->dispatch(XrlError::BAD_ARGS());	return;    }    cb->dispatch(e);}boolXrlOspfV0p1Client::send_get_lsdb_limit(	const char*	the_tgt, 	const GetLsdbLimitCB&	cb){    Xrl x(the_tgt, "ospf/0.1/get_lsdb_limit");    return _sender->send(x, callback(this, &XrlOspfV0p1Client::unmarshall_get_lsdb_limit, cb));}/* Unmarshall get_lsdb_limit */voidXrlOspfV0p1Client::unmarshall_get_lsdb_limit(	const XrlError&	e, 	XrlArgs*	a, 	GetLsdbLimitCB		cb){    if (e != XrlError::OKAY()) {	cb->dispatch(e, 0);	return;    } else if (a && a->size() != 1) {	XLOG_ERROR("Wrong number of arguments (%u != 1)", (uint32_t)a->size());	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    int32_t limit;    try {	a->get("limit", limit);    } catch (const XrlArgs::XrlAtomNotFound&) {	XLOG_ERROR("Atom not found");	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    cb->dispatch(e, &limit);}boolXrlOspfV0p1Client::send_set_mospf(	const char*	the_tgt, 	const bool&	enabled, 	const SetMospfCB&	cb){    Xrl x(the_tgt, "ospf/0.1/set_mospf");    x.args().add("enabled", enabled);    return _sender->send(x, callback(this, &XrlOspfV0p1Client::unmarshall_set_mospf, cb));}/* Unmarshall set_mospf */voidXrlOspfV0p1Client::unmarshall_set_mospf(	const XrlError&	e, 	XrlArgs*	a, 	SetMospfCB		cb){    if (e != XrlError::OKAY()) {	cb->dispatch(e);	return;    } else if (a && a->size() != 0) {	XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size());	cb->dispatch(XrlError::BAD_ARGS());	return;    }    cb->dispatch(e);}boolXrlOspfV0p1Client::send_get_mospf(	const char*	the_tgt, 	const GetMospfCB&	cb){    Xrl x(the_tgt, "ospf/0.1/get_mospf");    return _sender->send(x, callback(this, &XrlOspfV0p1Client::unmarshall_get_mospf, cb));}/* Unmarshall get_mospf */voidXrlOspfV0p1Client::unmarshall_get_mospf(	const XrlError&	e, 	XrlArgs*	a, 	GetMospfCB		cb){    if (e != XrlError::OKAY()) {	cb->dispatch(e, 0);	return;    } else if (a && a->size() != 1) {	XLOG_ERROR("Wrong number of arguments (%u != 1)", (uint32_t)a->size());	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    bool enabled;    try {	a->get("enabled", enabled);    } catch (const XrlArgs::XrlAtomNotFound&) {	XLOG_ERROR("Atom not found");	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    cb->dispatch(e, &enabled);}boolXrlOspfV0p1Client::send_set_interarea_mc(	const char*	the_tgt, 	const bool&	enabled, 	const SetInterareaMcCB&	cb){    Xrl x(the_tgt, "ospf/0.1/set_interarea_mc");    x.args().add("enabled", enabled);    return _sender->send(x, callback(this, &XrlOspfV0p1Client::unmarshall_set_interarea_mc, cb));}/* Unmarshall set_interarea_mc */voidXrlOspfV0p1Client::unmarshall_set_interarea_mc(	const XrlError&	e, 	XrlArgs*	a, 	SetInterareaMcCB		cb){    if (e != XrlError::OKAY()) {	cb->dispatch(e);	return;    } else if (a && a->size() != 0) {	XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size());	cb->dispatch(XrlError::BAD_ARGS());	return;    }    cb->dispatch(e);}boolXrlOspfV0p1Client::send_get_interarea_mc(	const char*	the_tgt, 	const GetInterareaMcCB&	cb){    Xrl x(the_tgt, "ospf/0.1/get_interarea_mc");    return _sender->send(x, callback(this, &XrlOspfV0p1Client::unmarshall_get_interarea_mc, cb));}/* Unmarshall get_interarea_mc */voidXrlOspfV0p1Client::unmarshall_get_interarea_mc(	const XrlError&	e, 	XrlArgs*	a, 	GetInterareaMcCB		cb){    if (e != XrlError::OKAY()) {	cb->dispatch(e, 0);	return;    } else if (a && a->size() != 1) {	XLOG_ERROR("Wrong number of arguments (%u != 1)", (uint32_t)a->size());	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    bool enabled;    try {	a->get("enabled", enabled);    } catch (const XrlArgs::XrlAtomNotFound&) {	XLOG_ERROR("Atom not found");	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    cb->dispatch(e, &enabled);}boolXrlOspfV0p1Client::send_set_overflow_interval(	const char*	the_tgt, 	const int32_t&	ovfl_int, 	const SetOverflowIntervalCB&	cb){    Xrl x(the_tgt, "ospf/0.1/set_overflow_interval");    x.args().add("ovfl_int", ovfl_int);    return _sender->send(x, callback(this, &XrlOspfV0p1Client::unmarshall_set_overflow_interval, cb));}/* Unmarshall set_overflow_interval */voidXrlOspfV0p1Client::unmarshall_set_overflow_interval(	const XrlError&	e, 	XrlArgs*	a, 	SetOverflowIntervalCB		cb){    if (e != XrlError::OKAY()) {	cb->dispatch(e);	return;    } else if (a && a->size() != 0) {	XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size());	cb->dispatch(XrlError::BAD_ARGS());	return;    }    cb->dispatch(e);}boolXrlOspfV0p1Client::send_get_overflow_interval(	const char*	the_tgt, 	const GetOverflowIntervalCB&	cb){    Xrl x(the_tgt, "ospf/0.1/get_overflow_interval");    return _sender->send(x, callback(this, &XrlOspfV0p1Client::unmarshall_get_overflow_interval, cb));}/* Unmarshall get_overflow_interval */voidXrlOspfV0p1Client::unmarshall_get_overflow_interval(	const XrlError&	e, 	XrlArgs*	a, 	GetOverflowIntervalCB		cb){    if (e != XrlError::OKAY()) {	cb->dispatch(e, 0);	return;    } else if (a && a->size() != 1) {	XLOG_ERROR("Wrong number of arguments (%u != 1)", (uint32_t)a->size());	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    int32_t ovfl_int;    try {	a->get("ovfl_int", ovfl_int);    } catch (const XrlArgs::XrlAtomNotFound&) {	XLOG_ERROR("Atom not found");	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    cb->dispatch(e, &ovfl_int);}boolXrlOspfV0p1Client::send_set_flood_rate(	const char*	the_tgt, 	const int32_t&	rate, 	const SetFloodRateCB&	cb){    Xrl x(the_tgt, "ospf/0.1/set_flood_rate");    x.args().add("rate", rate);    return _sender->send(x, callback(this, &XrlOspfV0p1Client::unmarshall_set_flood_rate, cb));}/* Unmarshall set_flood_rate */voidXrlOspfV0p1Client::unmarshall_set_flood_rate(	const XrlError&	e, 	XrlArgs*	a, 	SetFloodRateCB		cb){    if (e != XrlError::OKAY()) {	cb->dispatch(e);	return;    } else if (a && a->size() != 0) {	XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size());	cb->dispatch(XrlError::BAD_ARGS());	return;    }    cb->dispatch(e);}boolXrlOspfV0p1Client::send_get_flood_rate(	const char*	the_tgt, 	const GetFloodRateCB&	cb){    Xrl x(the_tgt, "ospf/0.1/get_flood_rate");    return _sender->send(x, callback(this, &XrlOspfV0p1Client::unmarshall_get_flood_rate, cb));}/* Unmarshall get_flood_rate */voidXrlOspfV0p1Client::unmarshall_get_flood_rate(	const XrlError&	e, 	XrlArgs*	a, 	GetFloodRateCB		cb){    if (e != XrlError::OKAY()) {	cb->dispatch(e, 0);	return;    } else if (a && a->size() != 1) {	XLOG_ERROR("Wrong number of arguments (%u != 1)", (uint32_t)a->size());	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    int32_t rate;    try {	a->get("rate", rate);    } catch (const XrlArgs::XrlAtomNotFound&) {	XLOG_ERROR("Atom not found");	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    cb->dispatch(e, &rate);}boolXrlOspfV0p1Client::send_set_max_rxmt_window(	const char*	the_tgt, 	const uint32_t&	window, 	const SetMaxRxmtWindowCB&	cb){    Xrl x(the_tgt, "ospf/0.1/set_max_rxmt_window");    x.args().add("window", window);    return _sender->send(x, callback(this, &XrlOspfV0p1Client::unmarshall_set_max_rxmt_window, cb));}/* Unmarshall set_max_rxmt_window */voidXrlOspfV0p1Client::unmarshall_set_max_rxmt_window(	const XrlError&	e, 	XrlArgs*	a, 	SetMaxRxmtWindowCB		cb){    if (e != XrlError::OKAY()) {	cb->dispatch(e);	return;    } else if (a && a->size() != 0) {	XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size());	cb->dispatch(XrlError::BAD_ARGS());	return;    }    cb->dispatch(e);}boolXrlOspfV0p1Client::send_get_max_rxmt_window(	const char*	the_tgt, 	const GetMaxRxmtWindowCB&	cb){    Xrl x(the_tgt, "ospf/0.1/get_max_rxmt_window");    return _sender->send(x, callback(this, &XrlOspfV0p1Client::unmarshall_get_max_rxmt_window, cb));}/* Unmarshall get_max_rxmt_window */voidXrlOspfV0p1Client::unmarshall_get_max_rxmt_window(	const XrlError&	e, 	XrlArgs*	a, 	GetMaxRxmtWindowCB		cb){    if (e != XrlError::OKAY()) {	cb->dispatch(e, 0);	return;    } else if (a && a->size() != 1) {	XLOG_ERROR("Wrong number of arguments (%u != 1)", (uint32_t)a->size());	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    uint32_t window;    try {	a->get("window", window);    } catch (const XrlArgs::XrlAtomNotFound&) {	XLOG_ERROR("Atom not found");	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    cb->dispatch(e, &window);}boolXrlOspfV0p1Client::send_set_max_dds(	const char*	the_tgt, 	const uint32_t&	max_dds, 	const SetMaxDdsCB&	cb){    Xrl x(the_tgt, "ospf/0.1/set_max_dds");    x.args().add("max_dds", max_dds);    return _sender->send(x, callback(this, &XrlOspfV0p1Client::unmarshall_set_max_dds, cb));}/* Unmarshall set_max_dds */voidXrlOspfV0p1Client::unmarshall_set_max_dds(	const XrlError&	e, 	XrlArgs*	a, 	SetMaxDdsCB		cb){    if (e != XrlError::OKAY()) {	cb->dispatch(e);	return;    } else if (a && a->size() != 0) {	XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size());	cb->dispatch(XrlError::BAD_ARGS());	return;    }    cb->dispatch(e);}boolXrlOspfV0p1Client::send_get_max_dds(	const char*	the_tgt, 	const GetMaxDdsCB&	cb){    Xrl x(the_tgt, "ospf/0.1/get_max_dds");    return _sender->send(x, callback(this, &XrlOspfV0p1Client::unmarshall_get_max_dds, cb));}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?