tor  0.4.2.1-alpha-dev
namemap_st.h
1 /* Copyright (c) 2003-2004, Roger Dingledine
2  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
3  * Copyright (c) 2007-2018, The Tor Project, Inc. */
4 /* See LICENSE for licensing information */
5 
6 #ifndef NAMEMAP_ST_H
7 #define NAMEMAP_ST_H
8 
10 #include "ext/ht.h"
11 
12 struct smartlist_t;
13 
15 #define MAX_NAMEMAP_NAME_LEN 128
16 
18 typedef struct mapped_name_t {
19  HT_ENTRY(mapped_name_t) node;
20  unsigned intval;
21  char name[FLEXIBLE_ARRAY_MEMBER];
23 
26 struct namemap_t {
27  HT_HEAD(namemap_ht, mapped_name_t) ht;
28  struct smartlist_t *names;
29 };
30 
32 #define NAMEMAP_INIT() { HT_INITIALIZER(), NULL }
33 
34 #endif /* !defined(NAMEMAP_ST_H) */
Utility macros to handle different features and behavior in different compilers.