undefined4 FUN_00403444(char *param_1,void *param_2,int param_3)
{
int __fd;
int *piVar1;
char *pcVar2;
int iVar3;
char acStack_38 [16];
short local_28;
undefined1 auStack_26 [14];
memset(acStack_38,0,0x20) //possible issue identified - semgrep
strncpy(acStack_38,param_1,0x10) //possible issue identified - semgrep
__fd = socket(2,1,0);
if (__fd < 0) {
piVar1 = __errno_location();
pcVar2 = strerror(*piVar1);
warn("get_hwaddr: FAILED creating request socket for \'%s\' : %s\n",param_1,pcVar2);
}
else {
iVar3 = ioctl(__fd,0x8927,acStack_38);
if (iVar3 < 0) {
piVar1 = __errno_location();
pcVar2 = strerror(*piVar1);
warn("get_hwaddr(%d,%s): FAILED : %s\n",__fd,param_1,pcVar2);
}
else {
close(__fd);
if (local_28 == 1) {
memcpy(param_2,auStack_26,6) //possible issue identified - semgrep
return 1;
}
if (param_3 == 0) {
return 0;
}
warn("get_hwaddr: was expecting addr type to be Ether, not type %d\n");
}
}
return 0;
}