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