fti_xif.cc

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

CC
791
字号
/* * 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/fti_xif.cc,v 1.5 2003/09/12 23:43:39 pavlin Exp $"#include "fti_xif.hh"boolXrlFtiV0p2Client::send_start_transaction(	const char*	the_tgt, 	const StartTransactionCB&	cb){    Xrl x(the_tgt, "fti/0.2/start_transaction");    return _sender->send(x, callback(this, &XrlFtiV0p2Client::unmarshall_start_transaction, cb));}/* Unmarshall start_transaction */voidXrlFtiV0p2Client::unmarshall_start_transaction(	const XrlError&	e, 	XrlArgs*	a, 	StartTransactionCB		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 tid;    try {	a->get("tid", tid);    } catch (const XrlArgs::XrlAtomNotFound&) {	XLOG_ERROR("Atom not found");	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    cb->dispatch(e, &tid);}boolXrlFtiV0p2Client::send_commit_transaction(	const char*	the_tgt, 	const uint32_t&	tid, 	const CommitTransactionCB&	cb){    Xrl x(the_tgt, "fti/0.2/commit_transaction");    x.args().add("tid", tid);    return _sender->send(x, callback(this, &XrlFtiV0p2Client::unmarshall_commit_transaction, cb));}/* Unmarshall commit_transaction */voidXrlFtiV0p2Client::unmarshall_commit_transaction(	const XrlError&	e, 	XrlArgs*	a, 	CommitTransactionCB		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);}boolXrlFtiV0p2Client::send_abort_transaction(	const char*	the_tgt, 	const uint32_t&	tid, 	const AbortTransactionCB&	cb){    Xrl x(the_tgt, "fti/0.2/abort_transaction");    x.args().add("tid", tid);    return _sender->send(x, callback(this, &XrlFtiV0p2Client::unmarshall_abort_transaction, cb));}/* Unmarshall abort_transaction */voidXrlFtiV0p2Client::unmarshall_abort_transaction(	const XrlError&	e, 	XrlArgs*	a, 	AbortTransactionCB		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);}boolXrlFtiV0p2Client::send_add_entry4(	const char*	the_tgt, 	const uint32_t&	tid, 	const IPv4Net&	dst, 	const IPv4&	gateway, 	const string&	ifname, 	const string&	vifname, 	const uint32_t&	metric, 	const uint32_t&	admin_distance, 	const string&	protocol_origin, 	const AddEntry4CB&	cb){    Xrl x(the_tgt, "fti/0.2/add_entry4");    x.args().add("tid", tid);    x.args().add("dst", dst);    x.args().add("gateway", gateway);    x.args().add("ifname", ifname);    x.args().add("vifname", vifname);    x.args().add("metric", metric);    x.args().add("admin_distance", admin_distance);    x.args().add("protocol_origin", protocol_origin);    return _sender->send(x, callback(this, &XrlFtiV0p2Client::unmarshall_add_entry4, cb));}/* Unmarshall add_entry4 */voidXrlFtiV0p2Client::unmarshall_add_entry4(	const XrlError&	e, 	XrlArgs*	a, 	AddEntry4CB		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);}boolXrlFtiV0p2Client::send_add_entry6(	const char*	the_tgt, 	const uint32_t&	tid, 	const IPv6Net&	dst, 	const IPv6&	gateway, 	const string&	ifname, 	const string&	vifname, 	const uint32_t&	metric, 	const uint32_t&	admin_distance, 	const string&	protocol_origin, 	const AddEntry6CB&	cb){    Xrl x(the_tgt, "fti/0.2/add_entry6");    x.args().add("tid", tid);    x.args().add("dst", dst);    x.args().add("gateway", gateway);    x.args().add("ifname", ifname);    x.args().add("vifname", vifname);    x.args().add("metric", metric);    x.args().add("admin_distance", admin_distance);    x.args().add("protocol_origin", protocol_origin);    return _sender->send(x, callback(this, &XrlFtiV0p2Client::unmarshall_add_entry6, cb));}/* Unmarshall add_entry6 */voidXrlFtiV0p2Client::unmarshall_add_entry6(	const XrlError&	e, 	XrlArgs*	a, 	AddEntry6CB		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);}boolXrlFtiV0p2Client::send_delete_entry4(	const char*	the_tgt, 	const uint32_t&	tid, 	const IPv4Net&	dst, 	const DeleteEntry4CB&	cb){    Xrl x(the_tgt, "fti/0.2/delete_entry4");    x.args().add("tid", tid);    x.args().add("dst", dst);    return _sender->send(x, callback(this, &XrlFtiV0p2Client::unmarshall_delete_entry4, cb));}/* Unmarshall delete_entry4 */voidXrlFtiV0p2Client::unmarshall_delete_entry4(	const XrlError&	e, 	XrlArgs*	a, 	DeleteEntry4CB		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);}boolXrlFtiV0p2Client::send_delete_entry6(	const char*	the_tgt, 	const uint32_t&	tid, 	const IPv6Net&	dst, 	const DeleteEntry6CB&	cb){    Xrl x(the_tgt, "fti/0.2/delete_entry6");    x.args().add("tid", tid);    x.args().add("dst", dst);    return _sender->send(x, callback(this, &XrlFtiV0p2Client::unmarshall_delete_entry6, cb));}/* Unmarshall delete_entry6 */voidXrlFtiV0p2Client::unmarshall_delete_entry6(	const XrlError&	e, 	XrlArgs*	a, 	DeleteEntry6CB		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);}boolXrlFtiV0p2Client::send_delete_all_entries(	const char*	the_tgt, 	const uint32_t&	tid, 	const DeleteAllEntriesCB&	cb){    Xrl x(the_tgt, "fti/0.2/delete_all_entries");    x.args().add("tid", tid);    return _sender->send(x, callback(this, &XrlFtiV0p2Client::unmarshall_delete_all_entries, cb));}/* Unmarshall delete_all_entries */voidXrlFtiV0p2Client::unmarshall_delete_all_entries(	const XrlError&	e, 	XrlArgs*	a, 	DeleteAllEntriesCB		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);}boolXrlFtiV0p2Client::send_delete_all_entries4(	const char*	the_tgt, 	const uint32_t&	tid, 	const DeleteAllEntries4CB&	cb){    Xrl x(the_tgt, "fti/0.2/delete_all_entries4");    x.args().add("tid", tid);    return _sender->send(x, callback(this, &XrlFtiV0p2Client::unmarshall_delete_all_entries4, cb));}/* Unmarshall delete_all_entries4 */voidXrlFtiV0p2Client::unmarshall_delete_all_entries4(	const XrlError&	e, 	XrlArgs*	a, 	DeleteAllEntries4CB		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);}boolXrlFtiV0p2Client::send_delete_all_entries6(	const char*	the_tgt, 	const uint32_t&	tid, 	const DeleteAllEntries6CB&	cb){    Xrl x(the_tgt, "fti/0.2/delete_all_entries6");    x.args().add("tid", tid);    return _sender->send(x, callback(this, &XrlFtiV0p2Client::unmarshall_delete_all_entries6, cb));}/* Unmarshall delete_all_entries6 */voidXrlFtiV0p2Client::unmarshall_delete_all_entries6(	const XrlError&	e, 	XrlArgs*	a, 	DeleteAllEntries6CB		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);}boolXrlFtiV0p2Client::send_lookup_route4(	const char*	the_tgt, 	const IPv4&	dst, 	const LookupRoute4CB&	cb){    Xrl x(the_tgt, "fti/0.2/lookup_route4");    x.args().add("dst", dst);    return _sender->send(x, callback(this, &XrlFtiV0p2Client::unmarshall_lookup_route4, cb));}/* Unmarshall lookup_route4 */voidXrlFtiV0p2Client::unmarshall_lookup_route4(	const XrlError&	e, 	XrlArgs*	a, 	LookupRoute4CB		cb){    if (e != XrlError::OKAY()) {	cb->dispatch(e, 0, 0, 0, 0, 0, 0, 0);	return;    } else if (a && a->size() != 7) {

⌨️ 快捷键说明

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