From 67994842694e57a42f524e228ca7acc564f2104f Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sun, 30 Nov 2008 14:01:29 +0100 Subject: network: make tx buffer initialization independent of mcast config This patch changes the prototype of mcast_buffered_init() to receive as argument the MTU size instead of the multicast configuration. This decouples the initialization of the tx buffer from the multicast configuration. This patch is needed by the multi-dedicated link support. Signed-off-by: Pablo Neira Ayuso --- src/network.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/network.c') diff --git a/src/network.c b/src/network.c index 04c9d39..78be1e2 100644 --- a/src/network.c +++ b/src/network.c @@ -85,12 +85,12 @@ static char *tx_buf; #define HEADERSIZ 28 /* IP header (20 bytes) + UDP header 8 (bytes) */ -int mcast_buffered_init(struct mcast_conf *mconf) +int mcast_buffered_init(int if_mtu) { - int mtu = mconf->mtu - HEADERSIZ; + int mtu = if_mtu - HEADERSIZ; /* default to Ethernet MTU 1500 bytes */ - if (mconf->mtu == 0) + if (if_mtu == 0) mtu = 1500 - HEADERSIZ; tx_buf = malloc(mtu); -- cgit v1.2.3