Lines Matching refs:key

22     const ConnectionKey *key = opaque;  in connection_key_hash()  local
26 a = b = c = JHASH_INITVAL + sizeof(*key); in connection_key_hash()
27 a += key->src.s_addr; in connection_key_hash()
28 b += key->dst.s_addr; in connection_key_hash()
29 c += (key->src_port | key->dst_port << 16); in connection_key_hash()
32 a += key->ip_proto; in connection_key_hash()
100 void extract_ip_and_port(uint32_t tmp_ports, ConnectionKey *key, in extract_ip_and_port() argument
104 key->src = pkt->ip->ip_dst; in extract_ip_and_port()
105 key->dst = pkt->ip->ip_src; in extract_ip_and_port()
106 key->src_port = ntohs(tmp_ports & 0xffff); in extract_ip_and_port()
107 key->dst_port = ntohs(tmp_ports >> 16); in extract_ip_and_port()
109 key->src = pkt->ip->ip_src; in extract_ip_and_port()
110 key->dst = pkt->ip->ip_dst; in extract_ip_and_port()
111 key->src_port = ntohs(tmp_ports >> 16); in extract_ip_and_port()
112 key->dst_port = ntohs(tmp_ports & 0xffff); in extract_ip_and_port()
116 void fill_connection_key(Packet *pkt, ConnectionKey *key, bool reverse) in fill_connection_key() argument
120 key->ip_proto = pkt->ip->ip_p; in fill_connection_key()
122 switch (key->ip_proto) { in fill_connection_key()
138 extract_ip_and_port(tmp_ports, key, pkt, reverse); in fill_connection_key()
141 Connection *connection_new(ConnectionKey *key) in connection_new() argument
145 conn->ip_proto = key->ip_proto; in connection_new()
218 ConnectionKey *key, in connection_get() argument
221 Connection *conn = g_hash_table_lookup(connection_track_table, key); in connection_get()
224 ConnectionKey *new_key = g_memdup(key, sizeof(*key)); in connection_get()
226 conn = connection_new(key); in connection_get()
247 ConnectionKey *key) in connection_has_tracked() argument
249 Connection *conn = g_hash_table_lookup(connection_track_table, key); in connection_has_tracked()