From c28265764ec6ad9995eb0c761a376ffc9f141fcd Mon Sep 17 00:00:00 2001 From: codeworkx Date: Mon, 17 Sep 2012 17:53:57 +0200 Subject: applied patches from i9305 jb sources, updated mali to r3p0 Change-Id: Iec4bc4e2fb59e2cf5b4d25568a644d4e3719565e --- .../interceptor/linux_virtual_adapter_internal.h | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 drivers/interceptor/linux_virtual_adapter_internal.h (limited to 'drivers/interceptor/linux_virtual_adapter_internal.h') diff --git a/drivers/interceptor/linux_virtual_adapter_internal.h b/drivers/interceptor/linux_virtual_adapter_internal.h new file mode 100644 index 0000000..72f3b01 --- /dev/null +++ b/drivers/interceptor/linux_virtual_adapter_internal.h @@ -0,0 +1,73 @@ +/* Netfilter Driver for IPSec VPN Client + * + * Copyright(c) 2012 Samsung Electronics + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/* + * + * linux_virtual_adapter_internal.h + * + * Internal declarations for linux virtual adapters. + * + */ + + +#ifndef LINUX_VIRTUAL_ADAPTER_INTERNAL_H +#define LINUX_VIRTUAL_ADAPTER_INTERNAL_H + +#include "virtual_adapter.h" + +/* **************************** Types and Definitions ************************/ + +/* Maximum number of virtual adapters. */ +#define SSH_LINUX_MAX_VIRTUAL_ADAPTERS 16 + +/* Prefix for adapter names. */ +#define SSH_ADAPTER_NAME_PREFIX "vip" + +/* HW address lenght. */ +#define SSH_MAX_VIRTUAL_ADAPTER_HWADDR_LEN 6 + +/* Maximum number of configured IPv6 addresses the virtual adapter saves + and restores on ifdown / ifup. */ +#define SSH_VIRTUAL_ADAPTER_MAX_IPV6_ADDRS 2 + +/* Context for a virtual adapter. */ +typedef struct SshVirtualAdapterRec +{ + /* Is the adapter initialized. This is 0 until the + ssh_virtual_adapter_create() returns. */ + SshUInt8 initialized : 1; + + /* Is the adapter destroyed. */ + SshUInt8 destroyed : 1; + + /* Is the adapter attached to engine. */ + SshUInt8 attached : 1; + + /* Packet callback. */ + SshVirtualAdapterPacketCB packet_cb; + + /* Destructor for engine-level block */ + SshVirtualAdapterDetachCB detach_cb; + void *adapter_context; + + /* The low-level implementation of a virtual adapter. */ + + /* Platform dependant low-level implementation structure. */ + struct net_device *dev; + struct net_device_stats low_level_stats; + +} SshVirtualAdapterStruct, *SshVirtualAdapter; + +/* ******************************* Functions *********************************/ + +int ssh_interceptor_virtual_adapter_init(SshInterceptor interceptor); +int ssh_interceptor_virtual_adapter_uninit(SshInterceptor interceptor); + +#endif /* LINUX_VIRTUAL_ADAPTER_INTERNAL_H */ -- cgit v1.1