00001 /* 00002 ** Copyright (C) 2002-2006 - INL 00003 ** Written by Eric Leblond <eric@regit.org> 00004 ** Vincent Deffontaines <vincent@gryzor.com> 00005 ** INL http://www.inl.fr/ 00006 ** 00007 ** $Id: proto_v3.h 5285 2008-11-21 15:39:55Z pollux $ 00008 ** 00009 ** This program is free software; you can redistribute it and/or modify 00010 ** it under the terms of the GNU General Public License as published by 00011 ** the Free Software Foundation, version 3 of the License. 00012 ** 00013 ** This program is distributed in the hope that it will be useful, 00014 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 ** GNU General Public License for more details. 00017 ** 00018 ** You should have received a copy of the GNU General Public License 00019 ** along with this program; if not, write to the Free Software 00020 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 */ 00022 00023 #ifndef NUFW_PROTOCOL_V3_H 00024 #define NUFW_PROTOCOL_V3_H 00025 00026 #ifdef LINUX 00027 # include <endian.h> 00028 #else 00029 # include <machine/endian.h> 00030 #endif 00031 00038 /* 00039 * Protocol 3 definition 00040 */ 00041 00046 struct nuv3_conntrack_message_t { 00047 /* Copy/paste nufw_to_nuauth_message_header_t content */ 00048 uint8_t protocol_version; 00049 uint8_t msg_type; 00050 uint16_t msg_length; 00052 /* Conntrack fields */ 00053 uint32_t timeout; 00054 uint32_t ipv4_src; 00055 uint32_t ipv4_dst; 00056 uint8_t ipv4_protocol; 00057 uint16_t src_port; 00058 uint16_t dest_port; 00059 }; 00060 00065 typedef struct { 00066 /* Copy/paste nufw_to_nuauth_message_header_t content */ 00067 uint8_t protocol_version; 00068 uint8_t msg_type; 00069 uint16_t msg_length; 00071 /* Authentification fields */ 00072 uint32_t packet_id; 00073 uint32_t timestamp; 00075 /* (...): packet content (maybe truncated) */ 00076 } nuv3_nufw_to_nuauth_auth_message_t; 00077 00081 typedef struct { 00082 uint8_t protocol_version; 00083 uint8_t msg_type; 00084 u_int16_t mark; 00085 u_int8_t decision; 00086 uint8_t priority; 00087 uint16_t padding; 00088 uint32_t packet_id; 00089 uint16_t payload_len; 00092 } nuv3_nuauth_decision_response_t; 00093 00094 #endif /* NUFW_PROTOCOL_V3_H */
1.4.7