xref: /freebsd/contrib/tcpdump/netdissect-alloc.h (revision 266b0663c598b7e50c2998974c16f89b7ac23e3a)
1 /*
2  * Copyright (c) 2018 The TCPDUMP project
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that: (1) source code
7  * distributions retain the above copyright notice and this paragraph
8  * in its entirety, and (2) distributions including binary code include
9  * the above copyright notice and this paragraph in its entirety in
10  * the documentation or other materials provided with the distribution.
11  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
12  * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
13  * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14  * FOR A PARTICULAR PURPOSE.
15  */
16 
17 #ifndef netdissect_alloc_h
18 #define netdissect_alloc_h
19 
20 #include <stdarg.h>
21 #include "netdissect-stdinc.h"
22 #include "netdissect.h"
23 
24 typedef struct nd_mem_chunk {
25 	void *prev_mem_p;
26 	/* variable size data */
27 } nd_mem_chunk_t;
28 
29 void * nd_malloc(netdissect_options *, size_t);
30 void nd_free_all(netdissect_options *);
31 
32 #endif /* netdissect_alloc_h */
33