wlan-ap-Telecominfraproject/feeds/wlan-ap/opensync/patches/24-dhcp-events-proto-definitions.patch
Luka Kudra 0c0c7c678e opensync: dhcp events proto update
- group the common data in dhcp events into one message
- add a timestamp in milliseconds in each dhcp event
- aggregate all dhcp events into a single dhcp event

Signed-off-by: Luka Kudra <luka.kudra@netexperience.com>
2020-12-18 15:28:13 +01:00

85 lines
3.9 KiB
Diff

Index: opensync-2.0.5.0/interfaces/opensync_stats.proto
===================================================================
--- opensync-2.0.5.0.orig/interfaces/opensync_stats.proto
+++ opensync-2.0.5.0/interfaces/opensync_stats.proto
@@ -805,8 +805,79 @@ message EventReport {
repeated ClientConnectEvent client_connect_event = 10;
}
+ /* DHCP Common Data */
+ message DhcpCommonData {
+ required uint32 x_id = 1;
+ optional uint32 vlan_id = 2;
+ optional bytes dhcp_server_ip = 3;
+ optional bytes client_ip = 4;
+ optional bytes relay_ip = 5;
+ optional string device_mac_address = 6;
+ optional uint32 timestamp_ms = 7;
+ }
+
+ /* DHCP Ack Event */
+ message DhcpAckEvent {
+ optional DhcpCommonData dhcp_common_data = 1;
+ optional bytes subnet_mask = 2;
+ optional bytes primary_dns = 3;
+ optional bytes secondary_dns = 4;
+ optional uint32 lease_time = 5;
+ optional uint32 renewal_time = 6;
+ optional uint32 rebinding_time = 7;
+ optional uint32 time_offset = 8;
+ optional bytes gateway_ip = 9;
+ }
+
+ /* DHCP Nak Event */
+ message DhcpNakEvent {
+ optional DhcpCommonData dhcp_common_data = 1;
+ optional bool from_internal = 2;
+ }
+
+ /* DHCP Offer Event */
+ message DhcpOfferEvent {
+ optional DhcpCommonData dhcp_common_data = 1;
+ optional bool from_internal = 2;
+ }
+
+ /* DHCP Inform Event */
+ message DhcpInformEvent {
+ optional DhcpCommonData dhcp_common_data = 1;
+ }
+
+ /* DHCP Decline Event */
+ message DhcpDeclineEvent {
+ optional DhcpCommonData dhcp_common_data = 1;
+ }
+
+ /* DHCP Request Event */
+ message DhcpRequestEvent {
+ optional DhcpCommonData dhcp_common_data = 1;
+ optional string hostname = 2;
+ }
+
+ /* DHCP Discover Event */
+ message DhcpDiscoverEvent {
+ optional DhcpCommonData dhcp_common_data = 1;
+ optional string hostname = 2;
+ }
+
+ /* DHCP Event Bundle */
+ message DhcpEventBundle {
+ repeated DhcpAckEvent dhcp_ack_event = 1;
+ repeated DhcpNakEvent dhcp_nak_event = 2;
+ repeated DhcpOfferEvent dhcp_offer_event = 3;
+ repeated DhcpInformEvent dhcp_inform_event = 4;
+ repeated DhcpDeclineEvent dhcp_decline_event = 5;
+ repeated DhcpRequestEvent dhcp_request_event = 6;
+ repeated DhcpDiscoverEvent dhcp_discover_event = 7;
+ }
+
/* Multiple Client Sessions */
repeated ClientSession client_session = 1;
+ /* Multiple DHCP Events */
+ repeated DhcpEventBundle dhcp_event_bundle = 2;
}
////////////////////////////////////////////////////////////////////////////////