ports added
This commit is contained in:
parent
3cf4f4445a
commit
3e1ec7ebb0
2 changed files with 4 additions and 4 deletions
|
@ -205,7 +205,7 @@ namespace fw
|
|||
return json_string;
|
||||
}
|
||||
|
||||
String API::json_new_attribute(String key, uint8_t value, bool last)
|
||||
String API::json_new_attribute(String key, uint32_t value, bool last)
|
||||
{
|
||||
return json_new_attribute(key, String(value), last);
|
||||
}
|
||||
|
@ -232,8 +232,8 @@ namespace fw
|
|||
serialized_string += json_new_attribute("key", rule_ptr->key);
|
||||
serialized_string += json_new_attribute("source", rule_ptr->source);
|
||||
serialized_string += json_new_attribute("destination", rule_ptr->destination);
|
||||
serialized_string += json_new_attribute("port_from", rule_ptr->destination);
|
||||
serialized_string += json_new_attribute("port_to", rule_ptr->destination);
|
||||
serialized_string += json_new_attribute("port_from", rule_ptr->port_from);
|
||||
serialized_string += json_new_attribute("port_to", rule_ptr->port_to);
|
||||
serialized_string += json_new_attribute("protocol", protocol_to_string(rule_ptr->protocol));
|
||||
serialized_string += json_new_attribute("target", target_to_string(rule_ptr->target), true);
|
||||
serialized_string += "}";
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace fw
|
|||
|
||||
bool request_has_firewall_parameter();
|
||||
String json_new_attribute(String key, String value, bool last = false);
|
||||
String json_new_attribute(String key, uint8_t value, bool last = false);
|
||||
String json_new_attribute(String key, uint32_t value, bool last = false);
|
||||
void json_generic_response(String serialized_string, const uint16_t response_code);
|
||||
void json_message_response(String message, const uint16_t response_code);
|
||||
String construct_json_firewall_rule(firewall_rule_t *);
|
||||
|
|
Reference in a new issue