This patch factorizes the tcpiphdr structure to put the IPv4 fields in an union, for addition of version 6 in further patch. Using some macros, retrocompatibility of the existing code is assured. This patch also fixes the SLIRP_MSIZE and margin computation in various functions, and makes them compatible with the new tcpiphdr structure, whose size will be bigger than sizeof(struct tcphdr) + sizeof(struct ip) Signed-off-by: Guillaume Subiron <maethor@subiron.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
		
			
				
	
	
		
			24 lines
		
	
	
		
			555 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			555 B
		
	
	
	
		
			C
		
	
	
	
	
	
/*
 | 
						|
 * Copyright (c) 1995 Danny Gasparovski.
 | 
						|
 *
 | 
						|
 * Please read the file COPYRIGHT for the
 | 
						|
 * terms and conditions of the copyright.
 | 
						|
 */
 | 
						|
 | 
						|
#ifndef _IF_H_
 | 
						|
#define _IF_H_
 | 
						|
 | 
						|
#define IF_COMPRESS	0x01	/* We want compression */
 | 
						|
#define IF_NOCOMPRESS	0x02	/* Do not do compression */
 | 
						|
#define IF_AUTOCOMP	0x04	/* Autodetect (default) */
 | 
						|
#define IF_NOCIDCOMP	0x08	/* CID compression */
 | 
						|
 | 
						|
#define IF_MTU 1500
 | 
						|
#define IF_MRU 1500
 | 
						|
#define	IF_COMP IF_AUTOCOMP	/* Flags for compression */
 | 
						|
 | 
						|
/* 2 for alignment, 14 for ethernet */
 | 
						|
#define IF_MAXLINKHDR (2 + ETH_HLEN)
 | 
						|
 | 
						|
#endif
 |