[nox-dev] Change destination IP

2011-12-07 Thread Hyogi Jung
Hi All.

I'm working in Openflow using mininet that is virtual emulation.

I want to modify packet's destination IP address.
For example, If packet's destination is 10.0.0.2, then Switch modify
destination to 10.0.0.3.
So I modify some nox source code such as switch.cc. And add some actions to
switch such as OFPAT_SET_NW_DST.

Below sentence show switch's flows. *Red text* is action.
But It didn't work. Why? Do mininet support this action?

Could you give some advice?

Best Regards

- Hyogi

mininet dpctl dump-flows
*** s4

stats_reply (xid=0x52625b89): flags=none type=1(flow)
  cookie=0, duration_sec=33s, duration_nsec=70400s, table_id=1,
priority=32768, n_packets=71, n_bytes=2718, idle_timeout=60,hard_timeout=0,*
actions=mod_nw_dst:10.0.0.3*
  cookie=8661653833487901345, duration_sec=33s, duration_nsec=71900s,
table_id=1, priority=65535, n_packets=0, n_bytes=0,
idle_timeout=60,hard_timeout=0,arp,in_port=2,dl_vlan=0x,dl_vlan_pcp=0x00,dl_src=6a:e0:e2:84:06:d6,dl_dst=ff:ff:ff:ff:ff:ff,nw_src=0.0.0.0,nw_dst=0.0.0.0,nw_tos=0x00,nw_proto=0,tp_src=0,tp_dst=0,actions=FLOOD
  cookie=6090790159401796605, duration_sec=33s, duration_nsec=75300s,
table_id=1, priority=65535, n_packets=0, n_bytes=0,
idle_timeout=60,hard_timeout=0,arp,in_port=1,dl_vlan=0x,dl_vlan_pcp=0x00,dl_src=aa:7a:42:10:45:dc,dl_dst=ff:ff:ff:ff:ff:ff,nw_src=0.0.0.0,nw_dst=0.0.0.0,nw_tos=0x00,nw_proto=0,tp_src=0,tp_dst=0,actions=FLOOD

*This is my source.*

//

ofp_flow_mod* ofm;
size_t size = sizeof *ofm + sizeof(ofp_action_nw_addr);
boost::shared_arraychar raw_of(new char[size]);
ofm = (ofp_flow_mod*) raw_of.get();

ofm-header.version = OFP_VERSION;
ofm-header.type = OFPT_FLOW_MOD;
ofm-header.length = htons(size);
ofm-match.wildcards =htonl(OFPFW_ALL  (~OFPFW_NW_DST_ALL));


ofm-match.in_port = htons(flow.in_port);
ofm-match.dl_vlan = flow.dl_vlan;
ofm-match.dl_vlan_pcp = flow.dl_vlan_pcp;
memcpy(ofm-match.dl_src, flow.dl_src.octet, sizeof ofm-match.dl_src);
memcpy(ofm-match.dl_dst, flow.dl_dst.octet, sizeof ofm-match.dl_dst);

ofm-match.dl_type = flow.dl_type;

ofm-match.nw_src = flow.nw_src;
ofm-match.nw_dst = 33554442; // IP address : 10.0.0.2

ofm-match.nw_proto = flow.nw_proto;
ofm-match.nw_tos = flow.nw_tos;
ofm-match.tp_src = flow.tp_src;
ofm-match.tp_dst = flow.tp_dst;
ofm-cookie = htonl(0);
ofm-command = htons(OFPFC_ADD);
ofm-buffer_id = htonl(buffer_id);
ofm-idle_timeout = htons(60);
ofm-hard_timeout = htons(OFP_FLOW_PERMANENT);
ofm-priority = htons(OFP_DEFAULT_PRIORITY);
ofm-flags = htons(ofd_flow_mod_flags());

// OFPAT_SET_NW_DST
ofp_action_nw_addr dlset = *((ofp_action_nw_addr*)ofm-actions);
memset(dlset, 0, sizeof(ofp_action_nw_addr));
dlset.type = htons(OFPAT_SET_NW_DST);
dlset.len = htons(sizeof(ofp_action_nw_addr));
dlset.nw_addr = 50331658; // 50331658 IP address : 10.0.0.3

send_openflow_command(pi.datapath_id, ofm-header, true);

//

Not all OpenFlow actions are supported.

The following are not currently supported on any Indigo platform:
OFPAT_SET_NW_SRC (Set L3 IP source address) OFPAT_SET_NW_DST (Set L3 IP
destination address) OFPAT_SET_TP_SRC (Set L4 source port) OFPAT_SET_TP_DST
(Set L4 destination port)

The following are only supported on the Pronto 3290 and the Triumph 2
reference:
OFPAT_SET_DL_SRC (Set L2 MAC source address) OFPAT_SET_DL_DST (Set L2 MAC
destination address)

OFPAT_STRIP_VLAN (Strip VLAN tag) is supported (but with only limited
validation) on the 3290 and 3240 platforms. On other platforms, the
function can be implemented by setting to the system's untagged VLAN
(untested).
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


[nox-dev] error compiling...

2011-12-07 Thread Prashanth Prahalad


Just getting started with nox controller.



During compilation (make -j 5) I'm seeing this error :

../../src/nox_main.cc: In function ‘intunnamed::start_gui()’:
../../src/nox_main.cc:231: warning: deprecated conversion from string constant 
to ‘char*’
../../src/nox_main.cc: In function ‘int main(int, char**)’:
../../src/nox_main.cc:532: error: ‘EventDispatcherComponentinstall’ was not 
declared in this scope
../../src/nox_main.cc:532: error: expected ‘)’ before ‘;’ token
../../src/nox_main.cc:532: error: expected primary-expression before ‘)’ token
../../src/nox_main.cc:532: error: expected ‘;’ before ‘)’ token
make[2]: *** [nox_main.o] Error 1


Any ideas what's causing this ? 

Thanks !___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


Re: [nox-dev] error compiling...

2011-12-07 Thread Murphy McCauley
What platform are you trying to compile on, and which branch of NOX?  Have you 
tried the destiny branch?

-- Murphy

On Dec 7, 2011, at 1:39 AM, Prashanth Prahalad wrote:

 
 Just getting started with nox controller.
 
 During compilation (make -j 5) I'm seeing this error :
 
 ../../src/nox_main.cc: In function ‘intunnamed::start_gui()’:
 ../../src/nox_main.cc:231: warning: deprecated conversion from string 
 constant to ‘char*’
 ../../src/nox_main.cc: In function ‘int main(int, char**)’:
 ../../src/nox_main.cc:532: error: ‘EventDispatcherComponentinstall’ was not 
 declared in this scope
 ../../src/nox_main.cc:532: error: expected ‘)’ before ‘;’ token
 ../../src/nox_main.cc:532: error: expected primary-expression before ‘)’ token
 ../../src/nox_main.cc:532: error: expected ‘;’ before ‘)’ token
 make[2]: *** [nox_main.o] Error 1
 
 
 Any ideas what's causing this ? 
 
 Thanks !
 
 
 ___
 nox-dev mailing list
 nox-dev@noxrepo.org
 http://noxrepo.org/mailman/listinfo/nox-dev

___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


[nox-dev] Matching aggregate stats responses to requests

2011-12-07 Thread Shrutarshi Basu
If I send a bunch of aggregate stats requests for different flows, is there
a way for the aggregate_stats_in handler to know which response it is being
called on? I see that it gets the dpid, but what if I have multiple flows
on the same dpid that I want information on?
Thanks,
Basu

-- 
--
Shrutarshi Basu
Basus.me
The ByteBaker http://bytebaker.com -- because Computer Science is not
about computers
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev