]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
remove unused code
authorlaforge <laforge>
Sat, 8 Oct 2005 08:46:34 +0000 (08:46 +0000)
committerlaforge <laforge>
Sat, 8 Oct 2005 08:46:34 +0000 (08:46 +0000)
util/printpkt.c

index cb4db7de994142c4053f2d1245e77422eb1e8d46..5ea056865471405c2867e3601f76e1c5be8d5f09 100644 (file)
         ((unsigned char *)&addr)[2], \
         ((unsigned char *)&addr)[3]
 
-struct intr_id {
-       char* name;
-       unsigned int id;                
-};
-
 static char hostname[HOST_NAME_MAX+1];
 
 #define INTR_IDS       35
@@ -96,11 +91,6 @@ static struct ulogd_key printpkt_keys[INTR_IDS] = {
 #define GET_FLAGS(res, x)      (res[x].u.source->flags)
 #define pp_is_valid(res, x)    (GET_FLAGS(res, x) & ULOGD_RETF_VALID)
 
-#if 0
-#define GET_VALUE(x)   ulogd_keyh[intr_ids[x].id].interp->result[ulogd_keyh[intr_ids[x].id].offset].value
-#define GET_FLAGS(x)   ulogd_keyh[intr_ids[x].id].interp->result[ulogd_keyh[intr_ids[x].id].offset].flags
-#endif
-
 int printpkt_print(struct ulogd_key *res, char *buf, int prefix)
 {
        char *timestr;
@@ -260,37 +250,13 @@ int printpkt_print(struct ulogd_key *res, char *buf, int prefix)
        return 0;
 }
 
-/* get all key id's for the keys we are intrested in */
-static int get_ids(void)
-{
-#if 0
-       int i;
-       struct intr_id *cur_id;
-
-       for (i = 0; i < INTR_IDS; i++) {
-               cur_id = &intr_ids[i];
-               cur_id->id = keyh_getid(cur_id->name);
-               if (!cur_id->id) {
-                       ulogd_log(ULOGD_ERROR, 
-                               "Cannot resolve keyhash id for %s\n", 
-                               cur_id->name);
-                       return 1;
-               }
-       }       
-#endif
-       return 0;
-}
-
 int printpkt_init(void)
 {
        if (gethostname(hostname, sizeof(hostname)) < 0) {
                ulogd_log(ULOGD_FATAL, "can't gethostname(): %s\n",
                          strerror(errno));
-               exit(2);
+               return -EINVAL;
        }
 
-       if (get_ids())
-               return 1;
-
        return 0;
 }