// Path: src/main/java/com/github/sadikovi/netflowlib/predicate/Columns.java
// public static class IntColumn extends Column {
//   IntColumn() { }
// 
//   IntColumn(String name, int offset, int min, int max) {
//     super(name, Integer.class, offset);
//     minValue = min;
//     maxValue = max;
//   }
// 
//   public IntColumn(String name, int offset) {
//     this(name, offset, (int) 0, Integer.MAX_VALUE);
//   }
// 
//   @Override
//   public Object readField(WrappedByteBuf buffer) {
//     return buffer.getUnsignedShort(getColumnOffset());
//   }
// 
//   @Override
//   public void updateValueInspector(WrappedByteBuf buffer, ValueInspector vi) {
//     vi.update(buffer.getUnsignedShort(getColumnOffset()));
//   }
// 
//   @Override
//   public Object getMin() {
//     return minValue;
//   }
// 
//   @Override
//   public Object getMax() {
//     return maxValue;
//   }
// 
//   private int minValue;
//   private int maxValue;
// }
// 
// Path: src/main/java/com/github/sadikovi/netflowlib/predicate/Columns.java
// public static class LongColumn extends Column {
//   LongColumn() { }
// 
//   LongColumn(String name, int offset, long min, long max) {
//     super(name, Long.class, offset);
//     minValue = min;
//     maxValue = max;
//   }
// 
//   public LongColumn(String name, int offset) {
//     this(name, offset, (long) 0, Long.MAX_VALUE);
//   }
// 
//   @Override
//   public Object readField(WrappedByteBuf buffer) {
//     return buffer.getUnsignedInt(getColumnOffset());
//   }
// 
//   @Override
//   public void updateValueInspector(WrappedByteBuf buffer, ValueInspector vi) {
//     vi.update(buffer.getUnsignedInt(getColumnOffset()));
//   }
// 
//   @Override
//   public Object getMin() {
//     return minValue;
//   }
// 
//   @Override
//   public Object getMax() {
//     return maxValue;
//   }
// 
//   private long minValue;
//   private long maxValue;
// }
// 
// Path: src/main/java/com/github/sadikovi/netflowlib/predicate/Columns.java
// public static class ShortColumn extends Column {
//   ShortColumn() { }
// 
//   ShortColumn(String name, int offset, short min, short max) {
//     super(name, Short.class, offset);
//     minValue = min;
//     maxValue = max;
//   }
// 
//   public ShortColumn(String name, int offset) {
//     this(name, offset, (short) 0, Short.MAX_VALUE);
//   }
// 
//   @Override
//   public Object readField(WrappedByteBuf buffer) {
//     return buffer.getUnsignedByte(getColumnOffset());
//   }
// 
//   @Override
//   public void updateValueInspector(WrappedByteBuf buffer, ValueInspector vi) {
//     vi.update(buffer.getUnsignedByte(getColumnOffset()));
//   }
// 
//   @Override
//   public Object getMin() {
//     return minValue;
//   }
// 
//   @Override
//   public Object getMax() {
//     return maxValue;
//   }
// 
//   private short minValue;
//   private short maxValue;
// }


import com.github.sadikovi.netflowlib.predicate.Columns.IntColumn;
import com.github.sadikovi.netflowlib.predicate.Columns.LongColumn;
import com.github.sadikovi.netflowlib.predicate.Columns.ShortColumn;
/*
 * Copyright 2016 sadikovi
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.github.sadikovi.netflowlib.version;


public class NetFlowV7 extends NetFlow {
  // list of supported columns and size in bytes
  // Current seconds since 0000 UTC 1970, size: 4
  public static final LongColumn FIELD_UNIX_SECS = new LongColumn("unix_secs", 0);
  // Residual nanoseconds since 0000 UTC 1970, size: 4
  public static final LongColumn FIELD_UNIX_NSECS = new LongColumn("unix_nsecs", 4);
  // Current time in millisecs since router booted, size: 4
  public static final LongColumn FIELD_SYSUPTIME = new LongColumn("sys_uptime", 8);
  // Exporter IP address, size: 4
  public static final LongColumn FIELD_EXADDR = new LongColumn("export_ip", 12);
  // Source IP Address, size: 4
  public static final LongColumn FIELD_SRCADDR = new LongColumn("srcip", 16);
  // Destination IP Address, size: 4
  public static final LongColumn FIELD_DSTADDR = new LongColumn("dstip", 20);
  // Next hop router's IP Address, size: 4
  public static final LongColumn FIELD_NEXTHOP = new LongColumn("nexthop", 24);
  // Input interface index, size: 2
  public static final IntColumn FIELD_INPUT = new IntColumn("input", 28);
  // Output interface index, size: 2
  public static final IntColumn FIELD_OUTPUT = new IntColumn("output", 30);
  // Packets sent in Duration, size: 4
  public static final LongColumn FIELD_DPKTS = new LongColumn("packets", 32);
  // Octets sent in Duration, size: 4
  public static final LongColumn FIELD_DOCTETS = new LongColumn("octets", 36);
  // SysUptime at start of flow, size: 4
  public static final LongColumn FIELD_FIRST = new LongColumn("first", 40);
  // and of last packet of flow, size: 4
  public static final LongColumn FIELD_LAST = new LongColumn("last", 44);
  // TCP/UDP source port number or equivalent, size: 2
  public static final IntColumn FIELD_SRCPORT = new IntColumn("srcport", 48);
  // TCP/UDP destination port number or equiv, size: 2
  public static final IntColumn FIELD_DSTPORT = new IntColumn("dstport", 50);
  // IP protocol, e.g., 6=TCP, 17=UDP, ..., size: 1
// Path: src/main/java/com/github/sadikovi/netflowlib/predicate/Columns.java
// public static class IntColumn extends Column {
//   IntColumn() { }
// 
//   IntColumn(String name, int offset, int min, int max) {
//     super(name, Integer.class, offset);
//     minValue = min;
//     maxValue = max;
//   }
// 
//   public IntColumn(String name, int offset) {
//     this(name, offset, (int) 0, Integer.MAX_VALUE);
//   }
// 
//   @Override
//   public Object readField(WrappedByteBuf buffer) {
//     return buffer.getUnsignedShort(getColumnOffset());
//   }
// 
//   @Override
//   public void updateValueInspector(WrappedByteBuf buffer, ValueInspector vi) {
//     vi.update(buffer.getUnsignedShort(getColumnOffset()));
//   }
// 
//   @Override
//   public Object getMin() {
//     return minValue;
//   }
// 
//   @Override
//   public Object getMax() {
//     return maxValue;
//   }
// 
//   private int minValue;
//   private int maxValue;
// }
// 
// Path: src/main/java/com/github/sadikovi/netflowlib/predicate/Columns.java
// public static class LongColumn extends Column {
//   LongColumn() { }
// 
//   LongColumn(String name, int offset, long min, long max) {
//     super(name, Long.class, offset);
//     minValue = min;
//     maxValue = max;
//   }
// 
//   public LongColumn(String name, int offset) {
//     this(name, offset, (long) 0, Long.MAX_VALUE);
//   }
// 
//   @Override
//   public Object readField(WrappedByteBuf buffer) {
//     return buffer.getUnsignedInt(getColumnOffset());
//   }
// 
//   @Override
//   public void updateValueInspector(WrappedByteBuf buffer, ValueInspector vi) {
//     vi.update(buffer.getUnsignedInt(getColumnOffset()));
//   }
// 
//   @Override
//   public Object getMin() {
//     return minValue;
//   }
// 
//   @Override
//   public Object getMax() {
//     return maxValue;
//   }
// 
//   private long minValue;
//   private long maxValue;
// }
// 
// Path: src/main/java/com/github/sadikovi/netflowlib/predicate/Columns.java
// public static class ShortColumn extends Column {
//   ShortColumn() { }
// 
//   ShortColumn(String name, int offset, short min, short max) {
//     super(name, Short.class, offset);
//     minValue = min;
//     maxValue = max;
//   }
// 
//   public ShortColumn(String name, int offset) {
//     this(name, offset, (short) 0, Short.MAX_VALUE);
//   }
// 
//   @Override
//   public Object readField(WrappedByteBuf buffer) {
//     return buffer.getUnsignedByte(getColumnOffset());
//   }
// 
//   @Override
//   public void updateValueInspector(WrappedByteBuf buffer, ValueInspector vi) {
//     vi.update(buffer.getUnsignedByte(getColumnOffset()));
//   }
// 
//   @Override
//   public Object getMin() {
//     return minValue;
//   }
// 
//   @Override
//   public Object getMax() {
//     return maxValue;
//   }
// 
//   private short minValue;
//   private short maxValue;
// }


// Path: src/main/java/com/github/sadikovi/netflowlib/version/NetFlowV7.java
import com.github.sadikovi.netflowlib.predicate.Columns.IntColumn;
import com.github.sadikovi.netflowlib.predicate.Columns.LongColumn;
import com.github.sadikovi.netflowlib.predicate.Columns.ShortColumn;

/*
 * Copyright 2016 sadikovi
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.github.sadikovi.netflowlib.version;


public class NetFlowV7 extends NetFlow {
  // list of supported columns and size in bytes
  // Current seconds since 0000 UTC 1970, size: 4
  public static final LongColumn FIELD_UNIX_SECS = new LongColumn("unix_secs", 0);
  // Residual nanoseconds since 0000 UTC 1970, size: 4
  public static final LongColumn FIELD_UNIX_NSECS = new LongColumn("unix_nsecs", 4);
  // Current time in millisecs since router booted, size: 4
  public static final LongColumn FIELD_SYSUPTIME = new LongColumn("sys_uptime", 8);
  // Exporter IP address, size: 4
  public static final LongColumn FIELD_EXADDR = new LongColumn("export_ip", 12);
  // Source IP Address, size: 4
  public static final LongColumn FIELD_SRCADDR = new LongColumn("srcip", 16);
  // Destination IP Address, size: 4
  public static final LongColumn FIELD_DSTADDR = new LongColumn("dstip", 20);
  // Next hop router's IP Address, size: 4
  public static final LongColumn FIELD_NEXTHOP = new LongColumn("nexthop", 24);
  // Input interface index, size: 2
  public static final IntColumn FIELD_INPUT = new IntColumn("input", 28);
  // Output interface index, size: 2
  public static final IntColumn FIELD_OUTPUT = new IntColumn("output", 30);
  // Packets sent in Duration, size: 4
  public static final LongColumn FIELD_DPKTS = new LongColumn("packets", 32);
  // Octets sent in Duration, size: 4
  public static final LongColumn FIELD_DOCTETS = new LongColumn("octets", 36);
  // SysUptime at start of flow, size: 4
  public static final LongColumn FIELD_FIRST = new LongColumn("first", 40);
  // and of last packet of flow, size: 4
  public static final LongColumn FIELD_LAST = new LongColumn("last", 44);
  // TCP/UDP source port number or equivalent, size: 2
  public static final IntColumn FIELD_SRCPORT = new IntColumn("srcport", 48);
  // TCP/UDP destination port number or equiv, size: 2
  public static final IntColumn FIELD_DSTPORT = new IntColumn("dstport", 50);
  // IP protocol, e.g., 6=TCP, 17=UDP, ..., size: 1
  public static final ShortColumn FIELD_PROT = new ShortColumn("protocol", 52);