All Classes Files Functions Variables Pages
RoutingTable.idl
Go to the documentation of this file.
1 /**
2  * @file RoutingTable.idl
3  * @brief API for Rounting Table
4  * @version 2
5  */
6 
7 #import <kerio/web/idl/SharedStructures.idl>
8 #import <Interfaces.idl>
9 
10 module webadmin {
11 
12 enum RouteType {
13  RouteSystem,
14  RouteStatic,
15  RouteVpn
16 };
17 
18 struct Route {
19  boolean enabled; ///< valid only for RouteStatic
20  string name; ///< valid only for RouteStatic
21 
22  RouteType type; ///< Type defines Descriptions: RouteSystem: 'System route'
23  ///< RouteVpn: 'VPN route'
24  kerio::web::IpAddress network;
25  kerio::web::IpAddress mask; ///< used for IPv4
26  long prefixLen; ///< used for IPv6
27  kerio::web::IpAddress gateway;
28 
29  InterfaceType interfaceType; ///< @see InterfaceManager, used values: Ethernet, Ras, VpnTunnel, VpnServer
30  IdReference interfaceId; ///< invalid - interface is no more in the configuration
31  ///< @note: not used for interfaceType == VpnServer (it means 'VPN Server' in gui)
32  long metric;
33 };
34 
35 typedef sequence<Route> RouteList;
36 
37 interface RoutingTable {
38 
39  /**
40  * Gets routing table from system.
41  * @param routes - a list of routes currently stroed and used by system.
42  * @param ipv6 - use IPv6 routing table.
43  * @throws kerio::web::ApiException \n
44  * -32001 Session expired. - "The user is not logged in." \n
45  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
46  */
47  void get(out RouteList routes, in [Opt] boolean ipv6);
48 
49  /**
50  * Gets static routes.
51  * @param routes - a list of routes currently stroed and used by Control.
52  * @param ipv6 - use IPv6 routing table.
53  * @throws kerio::web::ApiException \n
54  * -32001 Session expired. - "The user is not logged in." \n
55  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
56  */
57  void getStaticRoutes(out RouteList routes, in [Opt] boolean ipv6);
58 
59  /**
60  * set static routes
61  * @param errors - list of errors \n
62  * 8002 Database error. - "Unable to modify route '%1/%2'." \n
63  * 8002 Database error. - "Unable to create route '%1/%2'." \n
64  * 8002 Database error. - "Unable to remove route '%1/%2'." \n
65  * @param routes - A list of routes that should be stored in configuration.
66  * @param ipv6 - use IPv6 routing table.
67  * @throws kerio::web::ApiException \n
68  * -32001 Session expired. - "The user is not logged in." \n
69  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
70  */
71  void setStaticRoutes(out kerio::web::ErrorList errors, in RouteList routes, in [Opt] boolean ipv6);
72 
73 };
74 
75 }; //webadmin
boolean enabled
valid only for RouteStatic
Definition: RoutingTable.idl:19
IdReference interfaceId
Definition: RoutingTable.idl:30
Definition: RoutingTable.idl:37
long prefixLen
used for IPv6
Definition: RoutingTable.idl:26
Definition: common.idl:28
InterfaceType interfaceType
Definition: RoutingTable.idl:29
Definition: RoutingTable.idl:18
string name
valid only for RouteStatic
Definition: RoutingTable.idl:20
RouteType type
Definition: RoutingTable.idl:22
API for network interfaces administration.
Definition: Accounting.idl:11
kerio::web::IpAddress mask
used for IPv4
Definition: RoutingTable.idl:25