안녕을 dpli_common.h 없습니다/SYS 내가이 프로그램을 컴파일하려고 :치명적인 오류가 : 그런 파일
#include <sys/types.h>
#include <sys/dlpi_ether.h>
#include <sys/dlpi_common.h>
#include <stropts.h>
#include <unistd.h>
int main(int argc,char *argv[])
{
int fd, status;
struct strioctl strcmd;
unsigned char addr[6];
fd = open(argv[1],0,0);
if (fd == -1) {
perror("enaddr: open");
exit(1);
}
strcmd.ic_cmd = DLIOCGENADDR;
strcmd.ic_timout = 0;
strcmd.ic_len = sizeof(addr);
strcmd.ic_dp = addr;
status = ioctl(fd,I_STR,&strcmd);
if (status == -1) {
perror("enaddr: ioctl");
exit(1);
}
printf("%02.2x:%02.2x:%02.2x:%02.2x:%02.2x:%02.2x\n",addr[0],addr[1],addr[2],addr[3],addr[4],addr[5]);
}
그리고 터미널 수익률이 치명적인 오류 :
prova.c : 3 : 30 : 치명적인 오류 : sys/dlpi_common.h : 해당 파일이나 디렉터리가 없습니다. 컴파일이 종료되었습니다.
왜? 이 도서관은 어디에 있습니까?
'dlpi' 구성 요소가 시스템에 설치되어 있습니까? – wallyk