mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
add object
This commit is contained in:
parent
4c16b53e5d
commit
8eaba26974
5 changed files with 48 additions and 5 deletions
|
|
@ -638,9 +638,24 @@ void insert_macs_from_file()
|
|||
fclose(fp);
|
||||
if (line)
|
||||
free(line);
|
||||
exit(EXIT_SUCCESS);
|
||||
//exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int insert_to_maclist(uint8_t mac[])
|
||||
{
|
||||
if(mac_in_maclist(mac))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
mac_list_entry_last++;
|
||||
for (int i = 0; i < ETH_ALEN; ++i) {
|
||||
mac_list[mac_list_entry_last][i] = mac[i];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int mac_in_maclist(uint8_t mac[])
|
||||
{
|
||||
for(int i = 0; i <= mac_list_entry_last; i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue