Add tethering client data limitation
[platform/core/connectivity/stc-manager.git] / plugin / tether / include / stc-plugin-tether.h
index b3d4439..f021516 100644 (file)
 #define __STC_PLUGIN_TETHER_H__
 
 #include <glib.h>
+#include <arpa/inet.h>
 #include "stc-error.h"
 #include "stc-manager.h"
 
 #define TETHERING_SERVICE_INTERFACE   "org.tizen.tethering"
 #define SIGNAL_NAME_DHCP_STATUS       "dhcp_status"
-#define STATION_STR_INFO_LEN          54
+#define STATION_MAC_STR_LEN           18
 #define STATION_STR_HOSTNAME_LEN      33
 
 typedef struct {
-       gchar *station_id;
-       gchar name[STATION_STR_HOSTNAME_LEN + 1];
-       gchar ip[STATION_STR_INFO_LEN + 1];
-       gchar mac[STATION_STR_INFO_LEN + 1];
+       gchar *station_id;                      /* Station unique ID (mac_hostname)*/
+       int classid;                            /* cgroup net_cls Classid of station */
+       gchar name[STATION_STR_HOSTNAME_LEN+1]; /* Station hostname */
+       gchar ip[INET_ADDRSTRLEN+1];            /* Station IP address */
+       gchar mac[STATION_MAC_STR_LEN+1];       /* Station MAC address */
 } tether_sta_info_s;
 
 typedef struct {
        int (*init) (void);
        void (*deinit) (void);
-       int (*status_changed) (void);
+       int (*get_station_ip) (const char *mac, char *ip);
+       int (*get_station_by_classid) (const int classid, char *mac);
+       int (*set_station_classid) (const char *mac, int classid);
 } stc_plugin_tether_s;
 
 int tether_init(void);
 void tether_deinit(void);
-stc_error_e tether_plugin_status_changed(void);
-
+stc_error_e tether_plugin_get_station_ip(const char *mac, char *ip);
+stc_error_e tether_plugin_get_station_by_classid(const int classid, char *mac);
+stc_error_e tether_plugin_set_station_classid(const char *mac, int classid);
 #endif /* __STC_PLUGIN_TETHER_H__ */