📄 netflow_v9.h
字号:
/* * Copyright (C) 2003-2004 WIDE Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */#include <sys/types.h>#define BYTES_32 1#define PKTS_32 2#define FLOWS 3#define PROT 4#define SRC_TOS 5#define TCP_FLAGS 6#define L4_SRC_PORT 7#define IPV4_SRC_ADDR 8#define SRC_MASK 9#define INPUT_SNMP 10#define L4_DST_PORT 11#define IPV4_DST_ADDR 12#define DST_MASK 13#define OUTPUT_SNMP 14#define IPV4_NEXT_HOP 15#define SRC_AS 16#define DST_AS 17#define BGP_NEXT_HOP 18#define IPM_DPKTS 19#define IPM_DOCTETS 20#define LAST_SWITCHED 21#define FIRST_SWITCHED 22#define BYTES_64 25#define PKTS_64 24#define MAC_ADDR 25#define VLAN_ID 26#define IPV6_SRC_ADDR 27#define IPV6_DST_ADDR 28#define IPV6_SRC_MASK 29#define IPV6_DST_MASK 30#define FLOW_LABEL 31#define ICMP_TYPE 32#define MUL_IGMP_TYPE 33#define SAMPLING_INTERVAL 34#define SAMPLING_ALGORITHM 35#define FLOW_ACTIVE_TIMEOUT 36#define FLOW_INACTIVE_TIMEOUT 37#define ENGINE_TYPE 38#define ENGINE_ID 39#define TOTAL_BYTES_EXPORTED 40#define TOTAL_EXPORT_PKTS_SENT 41#define TOTAL_FLOWS_EXPORTED 42#define FLOW_SAMPLER_ID 48#define FLOW_SAMPLER_MODE 49#define FLOW_SAMPLER_RANDOM_INTERVAL 50#define IP_PROTOCOL_VERSION 60#define DIRECTION 61#define IPV6_NEXT_HOP 62#define BGP_IPV6_NEXT_HOP 63#define IPV6_OPTION_HEADERS 64#define MPLS_LABEL_1 70#define MPLS_LABEL_2 71#define MPLS_LABEL_3 72#define MPLS_LABEL_4 73#define MPLS_LABEL_5 74#define MPLS_LABEL_6 75#define MPLS_LABEL_7 76#define MPLS_LABEL_8 77#define MPLS_LABEL_9 78#define MPLS_LABEL_10 79struct NetFlow_Version_9_Packet_Header{ u_int16_t Version; u_int16_t Count; u_int32_t System_Uptime; u_int32_t UNIX_Seconds; u_int32_t Package_Sequence; u_int32_t Source_ID;};struct NetFlow_Version_9_FlowSet_Header{ u_int16_t FlowSet_ID; u_int16_t Length;}; struct NetFlow_Version_9_Template_Header{ u_int16_t Template_ID; u_int16_t Field_Count;};struct NetFlow_Version_9_Options_Template_Header{ u_int16_t Template_ID; u_int16_t Options_Scope_Length; u_int16_t Options_Length;};struct NetFlow_Version_9_FlowSet_Record{ u_int16_t Type; u_int16_t Length;};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -