Commit 2dc4a06d by chris

""

1 parent 5058cf3b
......@@ -21,6 +21,6 @@ typedef struct {
typedef addr_pair key_type; /* index into hash table */
hash_type* addr_hash_create();
hash_type* addr_hash_create(void);
#endif /* __ADDR_HASH_H_ */
......@@ -417,7 +417,7 @@ void packet_init() {
}
strncpy(ifr.ifr_name, options.interface, IFNAMSIZ);
ifr.ifr_hwaddr.sa_family = AF_UNSPEC;
if (ioctl(s, SIOCGIFHWADDR, &ifr) == -1) {
if (ioctl(s, SIOCGIFADDR, &ifr) == -1) {
fprintf(stderr, "Error getting hardware address for interface: %s\n", options.interface);
perror("ioctl(SIOCGIFHWADDR)");
exit(1);
......@@ -428,6 +428,8 @@ void packet_init() {
for (s = 0; s < 6; ++s)
fprintf(stderr, "%c%02x", s ? ':' : ' ', (unsigned int)if_hw_addr[s]);
fprintf(stderr, "\n");
fprintf(stderr, "IP address is: %s", inet_ntoa(((struct sockaddr_in*)&ifr.ifr_addr)->sin_addr));
resolver_initialise();
......
......@@ -20,7 +20,7 @@ typedef struct {
int last_write;
} history_type;
void tick();
void tick(void);
void *xmalloc(size_t n);
void *xcalloc(size_t n, size_t m);
......
......@@ -14,6 +14,6 @@
#include <arpa/inet.h>
#include "hash.h"
hash_type* ns_hash_create();
hash_type* ns_hash_create(void);
#endif /* __NS_HASH_H_ */
......@@ -12,7 +12,7 @@
#include <netinet/in.h>
void resolver_initialise();
void resolver_initialise(void);
void resolve(struct in_addr* addr, char* result, int buflen);
......
......@@ -17,7 +17,7 @@ typedef struct {
int protocol;
} ip_service;
hash_type* serv_hash_create();
hash_type* serv_hash_create(void);
void serv_hash_initialise(hash_type* sh);
#endif /* __SERV_HASH_H_ */
......@@ -7,9 +7,9 @@
#ifndef __UI_H_ /* include guard */
#define __UI_H_
void ui_print();
void ui_loop();
void ui_finish();
void ui_print(void);
void ui_loop(void);
void ui_finish(void);
void ui_tick(int);
#endif /* __UI_H_ */
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!