1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
|
// -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
// Copyright (c) 2007-2009 XORP, Inc.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License, Version 2, June
// 1991 as published by the Free Software Foundation. Redistribution
// and/or modification of this program under the terms of any other
// version of the GNU General Public License is not permitted.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
// see the GNU General Public License, Version 2, a copy of which can be
// found in the XORP LICENSE.gpl file.
//
// XORP Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
// http://xorp.net
// $XORP: xorp/fea/data_plane/managers/fea_data_plane_manager_dummy.hh,v 1.11 2009/01/05 18:30:54 jtc Exp $
#ifndef __FEA_DATA_PLANE_MANAGERS_FEA_DATA_PLANE_MANAGER_DUMMY_HH__
#define __FEA_DATA_PLANE_MANAGERS_FEA_DATA_PLANE_MANAGER_DUMMY_HH__
#include "fea/fea_data_plane_manager.hh"
/**
* FEA data plane manager class for Dummy FEA.
*/
class FeaDataPlaneManagerDummy : public FeaDataPlaneManager {
public:
/**
* Constructor.
*
* @param fea_node the @ref FeaNode this manager belongs to.
*/
FeaDataPlaneManagerDummy(FeaNode& fea_node);
/**
* Virtual destructor.
*/
virtual ~FeaDataPlaneManagerDummy();
/**
* Load the plugins.
*
* @param error_msg the error message (if error).
* @return XORP_OK on success, otherwise XORP_ERROR.
*/
int load_plugins(string& error_msg);
/**
* Register the plugins.
*
* @param error_msg the error message (if error).
* @return XORP_OK on success, otherwise XORP_ERROR.
*/
int register_plugins(string& error_msg);
/**
* Allocate IoLink plugin instance.
*
* @param iftree the interface tree to use.
* @param if_name the interface name.
* @param vif_name the vif name.
* @param ether_type the EtherType protocol number. If it is 0 then
* it is unused.
* @param filter_program the option filter program to be applied on the
* received packets. The program uses tcpdump(1) style expression.
* @return a new instance of @ref IoLink plugin on success, otherwise NULL.
*/
IoLink* allocate_io_link(const IfTree& iftree,
const string& if_name,
const string& vif_name,
uint16_t ether_type,
const string& filter_program);
/**
* Allocate IoIp plugin instance.
*
* @param iftree the interface tree to use.
* @param family the address family (AF_INET or AF_INET6 for IPv4 and IPv6
* respectively).
* @param ip_protocol the IP protocol number (IPPROTO_*).
* @return a new instance of @ref IoIp plugin on success, otherwise NULL.
*/
IoIp* allocate_io_ip(const IfTree& iftree, int family,
uint8_t ip_protocol);
/**
* Allocate IoTcpUdp plugin instance.
*
* @param iftree the interface tree to use.
* @param family the address family (AF_INET or AF_INET6 for IPv4 and IPv6
* respectively).
* @param is_tcp if true allocate a TCP entry, otherwise UDP.
* @return a new instance of @ref IoTcpUdp plugin on success,
* otherwise NULL.
*/
IoTcpUdp* allocate_io_tcpudp(const IfTree& iftree, int family,
bool is_tcp);
private:
};
#endif // __FEA_DATA_PLANE_MANAGERS_FEA_DATA_PLANE_MANAGER_DUMMY_HH__
|