File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / iftop / addr_hash.h
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Oct 18 14:04:50 2016 UTC (7 years, 7 months ago) by misho
Branches: iftop, MAIN
CVS tags: v1_0rc4, HEAD
iftop 1.0pre4

/*
 * addr_hash.h:
 *
 */

#ifndef __ADDR_HASH_H_ /* include guard */
#define __ADDR_HASH_H_

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include "hash.h"

typedef struct {
    int af;
    unsigned short int protocol;
    unsigned short int src_port;
    union {
        struct in_addr src;
        struct in6_addr src6;
    };
    unsigned short int dst_port;
    union {
        struct in_addr dst;
        struct in6_addr dst6;
    };
} addr_pair;

typedef addr_pair key_type;      /* index into hash table */

hash_type* addr_hash_create(void);

#endif /* __ADDR_HASH_H_ */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>