pim_xif.cc

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

CC
2,654
字号
	cb->dispatch(XrlError::BAD_ARGS());	return;    }    cb->dispatch(e);}boolXrlPimV0p1Client::send_get_vif_proto_version(	const char*	the_tgt, 	const string&	vif_name, 	const GetVifProtoVersionCB&	cb){    Xrl x(the_tgt, "pim/0.1/get_vif_proto_version");    x.args().add("vif_name", vif_name);    return _sender->send(x, callback(this, &XrlPimV0p1Client::unmarshall_get_vif_proto_version, cb));}/* Unmarshall get_vif_proto_version */voidXrlPimV0p1Client::unmarshall_get_vif_proto_version(	const XrlError&	e, 	XrlArgs*	a, 	GetVifProtoVersionCB		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 proto_version;    try {	a->get("proto_version", proto_version);    } catch (const XrlArgs::XrlAtomNotFound&) {	XLOG_ERROR("Atom not found");	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    cb->dispatch(e, &proto_version);}boolXrlPimV0p1Client::send_set_vif_proto_version(	const char*	the_tgt, 	const string&	vif_name, 	const uint32_t&	proto_version, 	const SetVifProtoVersionCB&	cb){    Xrl x(the_tgt, "pim/0.1/set_vif_proto_version");    x.args().add("vif_name", vif_name);    x.args().add("proto_version", proto_version);    return _sender->send(x, callback(this, &XrlPimV0p1Client::unmarshall_set_vif_proto_version, cb));}/* Unmarshall set_vif_proto_version */voidXrlPimV0p1Client::unmarshall_set_vif_proto_version(	const XrlError&	e, 	XrlArgs*	a, 	SetVifProtoVersionCB		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);}boolXrlPimV0p1Client::send_reset_vif_proto_version(	const char*	the_tgt, 	const string&	vif_name, 	const ResetVifProtoVersionCB&	cb){    Xrl x(the_tgt, "pim/0.1/reset_vif_proto_version");    x.args().add("vif_name", vif_name);    return _sender->send(x, callback(this, &XrlPimV0p1Client::unmarshall_reset_vif_proto_version, cb));}/* Unmarshall reset_vif_proto_version */voidXrlPimV0p1Client::unmarshall_reset_vif_proto_version(	const XrlError&	e, 	XrlArgs*	a, 	ResetVifProtoVersionCB		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);}boolXrlPimV0p1Client::send_get_vif_hello_triggered_delay(	const char*	the_tgt, 	const string&	vif_name, 	const GetVifHelloTriggeredDelayCB&	cb){    Xrl x(the_tgt, "pim/0.1/get_vif_hello_triggered_delay");    x.args().add("vif_name", vif_name);    return _sender->send(x, callback(this, &XrlPimV0p1Client::unmarshall_get_vif_hello_triggered_delay, cb));}/* Unmarshall get_vif_hello_triggered_delay */voidXrlPimV0p1Client::unmarshall_get_vif_hello_triggered_delay(	const XrlError&	e, 	XrlArgs*	a, 	GetVifHelloTriggeredDelayCB		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 hello_triggered_delay;    try {	a->get("hello_triggered_delay", hello_triggered_delay);    } catch (const XrlArgs::XrlAtomNotFound&) {	XLOG_ERROR("Atom not found");	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    cb->dispatch(e, &hello_triggered_delay);}boolXrlPimV0p1Client::send_set_vif_hello_triggered_delay(	const char*	the_tgt, 	const string&	vif_name, 	const uint32_t&	hello_triggered_delay, 	const SetVifHelloTriggeredDelayCB&	cb){    Xrl x(the_tgt, "pim/0.1/set_vif_hello_triggered_delay");    x.args().add("vif_name", vif_name);    x.args().add("hello_triggered_delay", hello_triggered_delay);    return _sender->send(x, callback(this, &XrlPimV0p1Client::unmarshall_set_vif_hello_triggered_delay, cb));}/* Unmarshall set_vif_hello_triggered_delay */voidXrlPimV0p1Client::unmarshall_set_vif_hello_triggered_delay(	const XrlError&	e, 	XrlArgs*	a, 	SetVifHelloTriggeredDelayCB		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);}boolXrlPimV0p1Client::send_reset_vif_hello_triggered_delay(	const char*	the_tgt, 	const string&	vif_name, 	const ResetVifHelloTriggeredDelayCB&	cb){    Xrl x(the_tgt, "pim/0.1/reset_vif_hello_triggered_delay");    x.args().add("vif_name", vif_name);    return _sender->send(x, callback(this, &XrlPimV0p1Client::unmarshall_reset_vif_hello_triggered_delay, cb));}/* Unmarshall reset_vif_hello_triggered_delay */voidXrlPimV0p1Client::unmarshall_reset_vif_hello_triggered_delay(	const XrlError&	e, 	XrlArgs*	a, 	ResetVifHelloTriggeredDelayCB		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);}boolXrlPimV0p1Client::send_get_vif_hello_period(	const char*	the_tgt, 	const string&	vif_name, 	const GetVifHelloPeriodCB&	cb){    Xrl x(the_tgt, "pim/0.1/get_vif_hello_period");    x.args().add("vif_name", vif_name);    return _sender->send(x, callback(this, &XrlPimV0p1Client::unmarshall_get_vif_hello_period, cb));}/* Unmarshall get_vif_hello_period */voidXrlPimV0p1Client::unmarshall_get_vif_hello_period(	const XrlError&	e, 	XrlArgs*	a, 	GetVifHelloPeriodCB		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 hello_period;    try {	a->get("hello_period", hello_period);    } catch (const XrlArgs::XrlAtomNotFound&) {	XLOG_ERROR("Atom not found");	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    cb->dispatch(e, &hello_period);}boolXrlPimV0p1Client::send_set_vif_hello_period(	const char*	the_tgt, 	const string&	vif_name, 	const uint32_t&	hello_period, 	const SetVifHelloPeriodCB&	cb){    Xrl x(the_tgt, "pim/0.1/set_vif_hello_period");    x.args().add("vif_name", vif_name);    x.args().add("hello_period", hello_period);    return _sender->send(x, callback(this, &XrlPimV0p1Client::unmarshall_set_vif_hello_period, cb));}/* Unmarshall set_vif_hello_period */voidXrlPimV0p1Client::unmarshall_set_vif_hello_period(	const XrlError&	e, 	XrlArgs*	a, 	SetVifHelloPeriodCB		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);}boolXrlPimV0p1Client::send_reset_vif_hello_period(	const char*	the_tgt, 	const string&	vif_name, 	const ResetVifHelloPeriodCB&	cb){    Xrl x(the_tgt, "pim/0.1/reset_vif_hello_period");    x.args().add("vif_name", vif_name);    return _sender->send(x, callback(this, &XrlPimV0p1Client::unmarshall_reset_vif_hello_period, cb));}/* Unmarshall reset_vif_hello_period */voidXrlPimV0p1Client::unmarshall_reset_vif_hello_period(	const XrlError&	e, 	XrlArgs*	a, 	ResetVifHelloPeriodCB		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);}boolXrlPimV0p1Client::send_get_vif_hello_holdtime(	const char*	the_tgt, 	const string&	vif_name, 	const GetVifHelloHoldtimeCB&	cb){    Xrl x(the_tgt, "pim/0.1/get_vif_hello_holdtime");    x.args().add("vif_name", vif_name);    return _sender->send(x, callback(this, &XrlPimV0p1Client::unmarshall_get_vif_hello_holdtime, cb));}/* Unmarshall get_vif_hello_holdtime */voidXrlPimV0p1Client::unmarshall_get_vif_hello_holdtime(	const XrlError&	e, 	XrlArgs*	a, 	GetVifHelloHoldtimeCB		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 hello_holdtime;    try {	a->get("hello_holdtime", hello_holdtime);    } catch (const XrlArgs::XrlAtomNotFound&) {	XLOG_ERROR("Atom not found");	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    cb->dispatch(e, &hello_holdtime);}boolXrlPimV0p1Client::send_set_vif_hello_holdtime(	const char*	the_tgt, 	const string&	vif_name, 	const uint32_t&	hello_holdtime, 	const SetVifHelloHoldtimeCB&	cb){    Xrl x(the_tgt, "pim/0.1/set_vif_hello_holdtime");    x.args().add("vif_name", vif_name);    x.args().add("hello_holdtime", hello_holdtime);    return _sender->send(x, callback(this, &XrlPimV0p1Client::unmarshall_set_vif_hello_holdtime, cb));}/* Unmarshall set_vif_hello_holdtime */voidXrlPimV0p1Client::unmarshall_set_vif_hello_holdtime(	const XrlError&	e, 	XrlArgs*	a, 	SetVifHelloHoldtimeCB		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);}boolXrlPimV0p1Client::send_reset_vif_hello_holdtime(	const char*	the_tgt, 	const string&	vif_name, 	const ResetVifHelloHoldtimeCB&	cb){    Xrl x(the_tgt, "pim/0.1/reset_vif_hello_holdtime");    x.args().add("vif_name", vif_name);    return _sender->send(x, callback(this, &XrlPimV0p1Client::unmarshall_reset_vif_hello_holdtime, cb));}/* Unmarshall reset_vif_hello_holdtime */voidXrlPimV0p1Client::unmarshall_reset_vif_hello_holdtime(	const XrlError&	e, 	XrlArgs*	a, 	ResetVifHelloHoldtimeCB		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);}boolXrlPimV0p1Client::send_get_vif_dr_priority(	const char*	the_tgt, 	const string&	vif_name, 	const GetVifDrPriorityCB&	cb){    Xrl x(the_tgt, "pim/0.1/get_vif_dr_priority");    x.args().add("vif_name", vif_name);    return _sender->send(x, callback(this, &XrlPimV0p1Client::unmarshall_get_vif_dr_priority, cb));}/* Unmarshall get_vif_dr_priority */voidXrlPimV0p1Client::unmarshall_get_vif_dr_priority(	const XrlError&	e, 	XrlArgs*	a, 	GetVifDrPriorityCB		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 dr_priority;    try {	a->get("dr_priority", dr_priority);    } catch (const XrlArgs::XrlAtomNotFound&) {	XLOG_ERROR("Atom not found");	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    cb->dispatch(e, &dr_priority);}boolXrlPimV0p1Client::send_set_vif_dr_priority(	const char*	the_tgt, 	const string&	vif_name, 	const uint32_t&	dr_priority, 	const SetVifDrPriorityCB&	cb){    Xrl x(the_tgt, "pim/0.1/set_vif_dr_priority");    x.args().add("vif_name", vif_name);    x.args().add("dr_priority", dr_priority);    return _sender->send(x, callback(this, &XrlPimV0p1Client::unmarshall_set_vif_dr_priority, cb));}/* Unmarshall set_vif_dr_priority */voidXrlPimV0p1Client::unmarshall_set_vif_dr_priority(	const XrlError&	e, 	XrlArgs*	a, 	SetVifDrPriorityCB		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);}boolXrlPimV0p1Client::send_reset_vif_dr_priority(	const char*	the_tgt, 	const string&	vif_name, 	const ResetVifDrPriorityCB&	cb){    Xrl x(the_tgt, "pim/0.1/reset_vif_dr_priority");    x.args().add("vif_name", vif_name);    return _sender->send(x, callback(this, &XrlPimV0p1Client::unmarshall_reset_vif_dr_priority, cb));}/* Unmarshall reset_vif_dr_priority */voidXrlPimV0p1Client::unmarshall_reset_vif_dr_priority(	const XrlError&	e, 	XrlArgs*	a, 	ResetVifDrPriorityCB		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());

⌨️ 快捷键说明

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