Skip to content

Instantly share code, notes, and snippets.

View shun159's full-sized avatar
☁️
In da cloud

Eishun Kondoh shun159

☁️
In da cloud
View GitHub Profile
#
# NAPT TABLE implementation in TremaEdge
# Auther: Eishun Kondoh(e_kondo@ap-com.co.jp)
# Copyright (C) 2013 APCOMMUNICATIONS CO., LTD.
# 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.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#
# Routing Table And Routing Cache implementation in TremaEdge
# Auther: Eishun Kondoh(e_kondo@ap-com.co.jp)
# Copyright (C) 2013 APCOMMUNICATIONS CO., LTD.
# 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.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#
# NAPT TABLE implementation in TremaEdge
# Auther: Eishun Kondoh(e_kondo@ap-com.co.jp)
# Copyright (C) 2013 APCOMMUNICATIONS CO., LTD.
# 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.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
require 'rubygems'
require 'inline'
class Test
def run_main()
run
end
inline do |builder| builder.c <<-EOF
#!/usr/bin/perl -w
#
# Module: vyatta-wanloadbalance.pl
#
# 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.
#
# **** End License ****
#
#!/usr/bin/perl
#
# Module: vyatta-show-wlb-connection.pl
#
# **** License ****
# 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.
#
# This program is distributed in the hope that it will be useful, but
-module(flower_simple_switch).
-behaviour(gen_server).
%% --------------------------------------------------------------------
%% Include files
%% --------------------------------------------------------------------
-include("flower_debug.hrl").
-include("flower_packet.hrl").
-include("flower_flow.hrl").
require "rubygems"
require "bundler/setup"
require "trema"
require "pp"
class ArpTest < Controller
periodic_time_event :flood_arp_request_frames, 5
@shun159
shun159 / ARPパース結果.md
Last active December 23, 2015 04:19
operationの以下がずれているように見えます・
received an arp reply
{"destination_mac"=>
  #<Pio::Mac:0x7fadabee4de0
   @string="11:22:33:44:55:66",
   @value=18838586676582>,
 "source_mac"=>
  #<Pio::Mac:0x7fadabee3da0
   @string="5c:9a:d8:ea:37:32",
 @value=101820133947186&gt;,
@shun159
shun159 / ARP データ.md
Last active December 23, 2015 07:59
ARPデータの配列版です。

An ARP Reply From Host

[ 0x11,0x22,0x33,0x44,0x55,0x66,0x5c,0x9a,0xd8,0xea,0x37,0x32,0x08,0x06,0x00,0x01,0x08,0x00,0x06,0x04,0x00,0x02,0x5c,0x9a,0xd8,0xea,0x37,0x32,0xc0,0xa8,0x00,0x01,0x11,0x22,0x33,0x44,0x55,0x66,0xc0,0xa8,0x00,0xfe ]

An ARP Request From Host

[ 0xff,0xff,0xff,0xff,0xff,0xff,0x5c,0x9a,0xd8,0xea,0x37,0x32,0x08,0x06,0x00,0x01,0x08,0x00,0x06,0x04,0x00,0x01,0x5c,0x9a,0xd8,0xea,0x37,0x32,0xc0,0xa8,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xa8,0x00,0xfe ]