int (*probe) (struct connman_technology *technology);
void (*remove) (struct connman_technology *technology);
void (*add_interface) (struct connman_technology *technology,
- int index, const char *name);
+ int index, const char *name,
+ const char *ident);
void (*remove_interface) (struct connman_technology *technology,
int index);
int (*set_tethering) (struct connman_technology *technology,
int __connman_technology_remove_rfkill(unsigned int index);
void __connman_technology_add_interface(enum connman_service_type type,
- int index, const char *name);
+ int index, const char *name, const char *ident);
void __connman_technology_remove_interface(enum connman_service_type type,
- int index, const char *name);
+ int index, const char *name, const char *ident);
int __connman_technology_enable_tethering(void);
int __connman_technology_disable_tethering(void);
struct interface_data {
int index;
char *name;
+ char *ident;
enum connman_service_type type;
};
struct interface_data *interface = data;
__connman_technology_remove_interface(interface->type,
- interface->index, interface->name);
+ interface->index, interface->name, interface->ident);
+ g_free(interface->ident);
g_free(interface->name);
g_free(interface);
}
unsigned char operstate = 0xff;
const char *ifname = NULL;
unsigned int mtu = 0;
- char str[18];
+ char ident[13], str[18];
GSList *list;
memset(&stats, 0, sizeof(stats));
extract_link(msg, bytes, &address, &ifname, &mtu, &operstate, &stats);
+ snprintf(ident, 13, "%02x%02x%02x%02x%02x%02x",
+ address.ether_addr_octet[0],
+ address.ether_addr_octet[1],
+ address.ether_addr_octet[2],
+ address.ether_addr_octet[3],
+ address.ether_addr_octet[4],
+ address.ether_addr_octet[5]);
+
snprintf(str, 18, "%02X:%02X:%02X:%02X:%02X:%02X",
address.ether_addr_octet[0],
address.ether_addr_octet[1],
interface = g_new0(struct interface_data, 1);
interface->index = index;
interface->name = g_strdup(ifname);
+ interface->ident = g_strdup(ident);
g_hash_table_insert(interface_list,
GINT_TO_POINTER(index), interface);
read_uevent(interface);
__connman_technology_add_interface(interface->type,
- interface->index, interface->name);
+ interface->index, interface->name, interface->ident);
}
for (list = rtnl_list; list; list = list->next) {
}
void __connman_technology_add_interface(enum connman_service_type type,
- int index, const char *name)
+ int index, const char *name, const char *ident)
{
GSList *list;
if (technology->driver->add_interface)
technology->driver->add_interface(technology,
- index, name);
+ index, name, ident);
}
}
void __connman_technology_remove_interface(enum connman_service_type type,
- int index, const char *name)
+ int index, const char *name, const char *ident)
{
GSList *list;