141edb306SCy Schubert /* 241edb306SCy Schubert * Copyright (C) 2012 by Darren Reed. 341edb306SCy Schubert * 441edb306SCy Schubert * See the IPFILTER.LICENCE file for details on licencing. 541edb306SCy Schubert * 641edb306SCy Schubert * $Id: allocmbt.c,v 1.1.4.1 2012/07/22 08:04:24 darren_r Exp $ 741edb306SCy Schubert */ 841edb306SCy Schubert 941edb306SCy Schubert #include "ipf.h" 1041edb306SCy Schubert 11*efeb8bffSCy Schubert mb_t * 12*efeb8bffSCy Schubert allocmbt(size_t len) 1341edb306SCy Schubert { 1441edb306SCy Schubert mb_t *m; 1541edb306SCy Schubert 1641edb306SCy Schubert m = (mb_t *)malloc(sizeof(mb_t)); 1741edb306SCy Schubert if (m == NULL) 1841edb306SCy Schubert return NULL; 1941edb306SCy Schubert m->mb_len = len; 2041edb306SCy Schubert m->mb_next = NULL; 2141edb306SCy Schubert m->mb_data = (char *)m->mb_buf; 2241edb306SCy Schubert return m; 2341edb306SCy Schubert } 24