#!/usr/bin/env ruby # # $Id: sctp 172 2010-03-16 07:07:04Z jhart $ # require 'rubygems' require 'racket' include Racket unless (ARGV.size == 4) puts "Usage: #{$0} " exit end n = Racket::Racket.new n.iface = "eth0" n.l3 = L3::IPv4.new n.l3.src_ip = ARGV[0] n.l3.dst_ip = ARGV[2] n.l3.protocol = 132 n.l4 = L4::SCTP.new n.l4.src_port = ARGV[1].to_i n.l4.dst_port = ARGV[3].to_i #n.l4.add_chunk(1, 2, 8, "blah") f = n.sendpacket n.layers.compact.each do |l| puts l.pretty end puts "Sent #{f}"