]> mj.ucw.cz Git - netgrind.git/blobdiff - netgrind/netgrind.h
Added content-type to HTTP dump.
[netgrind.git] / netgrind / netgrind.h
index 2f53adf2a367e444846ffbefc7bba2e608356bab..fae60718b22b5349e3a4606762d0088e2e7be6a1 100644 (file)
@@ -70,9 +70,12 @@ enum close_cause {
   CAUSE_MAX
 };
 
+extern byte *flow_state_names[];
+extern byte *flow_cause_names[], *flow_cause_names_short[];
+
 struct appl_hooks {
   void (*open)(struct flow *f, u64 when);
-  void (*input)(struct flow *f, int dir, struct pkt *p); /* dir0 = sent by initiator */
+  void (*input)(struct flow *f, int dir, struct pkt *p); /* dir0 = sent by initiator, pkt_len(p)==0 for close */
   void (*close)(struct flow *f, int cause, u64 when);
 };
 
@@ -93,3 +96,18 @@ extern byte *save_dir;
 void sink_open(struct flow *f, u64 when);
 void sink_close(struct flow *f, int cause, u64 when);
 void sink_input(struct flow *f, int dir, struct pkt *p);
+
+#define TIMESTAMP_LEN 32
+void format_timestamp(byte *buf, u64 time);
+
+/* http.c */
+
+extern struct appl_hooks appl_http;
+
+/* histogram.c */
+
+void histogram_init(byte *name);
+void histogram_add_stat(byte *name, struct pkt_stats *stat);
+void histogram_add_int(byte *name, int *var);
+void histogram_step(uns time);
+void histogram_cleanup(void);