Kennt jemand diesen (Netzwerk?) Header: in.h
-
Hallo Forum,
ich möchte diesen Source compilieren und finde den Header in.h nicht. Ist der herstellerabhängig?
http://www.nettwerked.net/actiontec.html
/* test prog for actiontec router hack * by: omin0us * help from Sub. */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #define PORT 5035 #define DEST_IP "192.168.0.255" int main() { int sockfd; struct sockaddr_in actiontec_addr; int bytes_sent; char packet_data[] = "\x00\x00\x16\x02\x02\x00\x00\x00" "\x01\x00\xa8\xc0\x00\x00\x00\x00"; if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { fprintf(stderr, "Error: could not establish socket\n"); exit(1); } actiontec_addr.sin_family = AF_INET; actiontec_addr.sin_port = htons(PORT); actiontec_addr.sin_addr.s_addr = inet_addr(DEST_IP); memset(&(actiontec_addr.sin_zero), '\0', 8); if((bytes_sent = sendto(sockfd, packet_data, strlen(packet_data), 0, (struct sockaddr *)&actiontec_addr, sizeof(struct sockaddr))) == -1) { fprintf(stderr,"error: could not send data\n"); exit(1); } printf("sent %d bytes\n", bytes_sent); close(sockfd); return(0); }
-
Hab den Fehler gefunden. War ein Mißverständins