[ADD] status function to get flows from switch, error handling.

Added a function to receive status from the switch through the
openflow controller. (not yet implemented anywhere)

The flow_mod and flow_stats function now have default values which
report that the function is not implemented when they're called but
no plugin has registered its functions for them.
This commit is contained in:
Christian Struck 2014-11-06 15:53:09 -08:00
parent c705375537
commit 8e2c269c2e
4 changed files with 59 additions and 19 deletions

View file

@ -12,8 +12,19 @@ export {
##
## returns: a JSON formatted string.
global convert: function(v: any, only_loggable: bool &default=F, field_escape_pattern: pattern &default=/^_/): string;
global jsonToRecord: function(input: string): any;
}
function jsonToRecord(input: string): any
{
local lhs: table[count] of string;
lhs = split1(input, / /);
for (i in lhs)
print lhs[i];
return lhs;
}
function convert(v: any, only_loggable: bool &default=F, field_escape_pattern: pattern &default=/^_/): string
{
local tn = type_name(v);