Skip to content

jcustenborder/netty-codec-netflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This project provides support for receiving NetFlow data from network devices using Netty. Currently only NetFlow v9 is supported. There are plans to support NetFlow v5 in a future release.

Usage

Pipeline Configuration

Bootstrap b = new Bootstrap();
b.group(bossGroup)
    .channel(NioDatagramChannel.class)
    .handler(new ChannelInitializer<DatagramChannel>() {
      @Override
      protected void initChannel(DatagramChannel datagramChannel) throws Exception {
        ChannelPipeline channelPipeline = datagramChannel.pipeline();
        channelPipeline.addLast(
            new LoggingHandler("NetFlow", LogLevel.TRACE),
            new NetFlowV9Decoder(),
            new NetFlowV9RequestHandler()
        );
      }
    });

NetFlow Message Processing

class NetFlowV9RequestHandler extends SimpleChannelInboundHandler<NetFlowV9Decoder.NetFlowMessage> {
  @Override
  protected void channelRead0(ChannelHandlerContext channelHandlerContext, NetFlowV9Decoder.NetFlowMessage netFlowMessage) throws Exception {

  }
}

Releases

No releases published

Packages

No packages published

Languages