Re: [nox-dev] routing module
Hi Linbo. I attached a script in Python that Bob Lantz sent me once. If you are using Mininet is just edit the file with your topology and change the hosts IPs to the desired ones. In this case you will not have to be worried about switch. I think the script solve you problem. But you can also configure switch with ifconfig command and set it as default route to the host in subnet. Then you can create ARP packets or insert entries in its ARP entries, using the command *arp -s ip_of_default_switch mac_of_default_switch, *as explained in exercise of Router Creating. Let me know the result after you try it. Hope it helps. Best Regards. 2011/9/4 linbo li...@csnet1.cs.tsinghua.edu.cn ** Hi Ricardo. Thank you for your reply. I have read the page: http://www.openflow.org/wk/index.php/OpenFlow_Tutorial#Create_Router, and I try it,is there anything else to do except configing the ip address,routing info ? Does the SW need to be configed ?If so,how to config it? Thank you! 2011-09-05 -- linbo -- *发件人:* Ricardo Bennesby *发送时间:* 2011-09-03 08:22:41 *收件人:* linbo *抄送:* nox-dev *主题:* Re: [nox-dev] routing module Hi Linbo. You can take a look on this link, it might helps: http://www.openflow.org/wk/index.php/OpenFlow_Tutorial#Create_Router This exercise of create a router to link two subnets helped on my group ongoing research. We are developing a NOX component that can do routing between two or more Networks or Domains. We are using multiples Mininets. Each Mininet represents a domain. If you have any doubt, feel free to ask. Best regards. 2011/9/1 linbo li...@csnet1.cs.tsinghua.edu.cn ** I want to know whether nox implement the function that enalbe two hosts in different subnets ping each other? Here is my topo: host1 host2 host3 host4 | | | | OFSWE1--OFSWC1---OFSWE2=== == 192.168.1.0/24 192.168.2.0/24 _||___ 1.Can host1 ping host3,the routing module can do this? 2.and I also want to know how the routing module to recompute the route path when a link failure happend? Hope someone can help me. Thank you! 2011-09-02 -- linbo ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica !DSPAM:1,4e61735132087516139689! -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica script.py Description: Binary data ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] routing module
Hi Linbo. You can take a look on this link, it might helps: http://www.openflow.org/wk/index.php/OpenFlow_Tutorial#Create_Router This exercise of create a router to link two subnets helped on my group ongoing research. We are developing a NOX component that can do routing between two or more Networks or Domains. We are using multiples Mininets. Each Mininet represents a domain. If you have any doubt, feel free to ask. Best regards. 2011/9/1 linbo li...@csnet1.cs.tsinghua.edu.cn ** I want to know whether nox implement the function that enalbe two hosts in different subnets ping each other? Here is my topo: host1 host2 host3 host4 | | | | OFSWE1--OFSWC1---OFSWE2=== == 192.168.1.0/24 192.168.2.0/24 _||___ 1.Can host1 ping host3,the routing module can do this? 2.and I also want to know how the routing module to recompute the route path when a link failure happend? Hope someone can help me. Thank you! 2011-09-02 -- linbo ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Change the destination of packets
Hi. I am really sorry. I had not specified the port of the controller previously in tcpdump. Now it is dumping the control traffic. Sorry for confusion. Hope it helps to find the problem. Best Regards. 2011/7/25 kk yap yap...@stanford.edu There are no OpenFlow control traffic in both. In fact, the second file is empty? Regards KK On 25 July 2011 07:30, Ricardo Bennesby ricardo.benne...@gmail.com wrote: Hi. The files generated by tcpdump in both controllers are attached. Hope it helps. Please let me know if it is wrong. Thanks for help. Best Regards. 2011/7/24 kk yap yap...@stanford.edu I mean a tcpdump of the control traffic. Not datapath. :) On 24 July 2011 10:04, Ricardo Bennesby ricardo.benne...@gmail.com wrote: Hi. The tcpdump .pcap file the print of a dump-flows command are attached. The dump-flows, tcp-dump and wireshark shows the same result: I first ping from 192.168.47.1 (h1- n2) to 10.0.0.2 (h2-n1) and take mac address, port and IP of h2. Then, when I ping from 192.168.47.1 to 192.168.47.2 (h2-n2) I want the packets be forwarded to 10.0.0.2. As the files shows, the packets are forwarded to MAC address desired, but it continues looking for the original IP, it means that it is not modified in the flow_mod. I tried in several way, fixing the original IP in the match field and setting an action to change the destination IP, but it didn't work. It con continues generating ARP request for 192.168.47.2. ofp_action_nw_addr *nwaction = (ofp_action_nw_addr *)malloc(sizeof(ofp_action_nw_addr)); nwaction-type = htons(OFPAT_SET_NW_DST); nwaction-len = htons(sizeof(ofp_action_nw_addr)); nwaction-nw_addr = inet_addr(10.0.0.2); In past discussions in the list, was said that openflow does routing in Layer 2. Is this a cause of destination IP does not change? Or am I missing something? Thank you very much for help. Best Regards. 2011/7/21 kk yap yap...@stanford.edu A tcpdump of the control traffic will be useful and easier. Regards KK On 21 July 2011 16:04, Ricardo Bennesby ricardo.benne...@gmail.com wrote: Hi KK. I tested as you suggested. ofm-match.nw_dst = htons(36677824); // I tested also ofm-match.nw_dst = flow.nw_dst; and in the action I did: nwaction-nw_addr = htons(new_ip); But it continue trying to send to IP 192.168.47.2... The Wireshark continues showing these: Ethernet II, Src: 5a:8c:01:8b:e0:fb (5a:8c:01:8b:e0:fb), Dst: 62:4c:de:97:90:e4 (62:4c:de:97:90:e4) Internet Protocol, Src: 192.168.47.1 (192.168.47.1), Dst: 192.168.47.2 (192.168.47.2) The MAC adress is of host with IP 10.0.0.2. So the dataframes arrive in this host. But the destination IP continues without midifications. Any suggestion? Thank you very much. Best Regards. 2011/7/21 kk yap yap...@stanford.edu Hi Ricardo, Try matching on the old IP, then rewrite to the new IP. Regards KK On 20 July 2011 14:50, Ricardo Bennesby ricardo.benne...@gmail.com wrote: Hi all. I would like to forward packets from one host to another. I have the following topology: c0 c0 | | s3- s3 /\/ \ h1 h2h1 h2 Each host can ping each other. The two networks are connected by their switches (s3). In net1 h1 and h2 have IP 10.0.0.1 and 10.0.0.2. In net2 h1 and h2 have IP 192.168.47.1 and 192.168.47.2 I want that everytime I ping from some host in 192.168.47.2 the packets be forward to 10.0.0.2. I am using the switch.cc component and making some modifications on it. I set some actions to achieve this, using flow_mod and changing the out_port, destination mac_address and destination IP. Using wireshark, listening to the port where h2 (10.0.0.2) is, I saw that it got an ARP request from h1. So, looks like the packets arrive in the correct ethernet address, but it continue asking for 192.168.47.2. The destination IP was not modified. The code follows: if (flow.nw_dst == 36677824){//if destination ip=192.168.47.2 uint8_t no_of_actions_len = 56; uint8_t action_length = no_of_actions_len/(sizeof(struct ofp_action_header)); unsigned char *action_type = (unsigned char*)malloc(action_length*sizeof(struct ofp_action_header)); ofp_flow_mod* ofm; size_t size = sizeof *ofm + 7*sizeof(ofp_action_output); boost::shared_arraychar raw_of(new char[size]); ofm = (ofp_flow_mod*) raw_of.get
Re: [nox-dev] Change the destination of packets
Hi KK. I tested as you suggested. *ofm-match.nw_dst = htons(36677824); // I tested also ofm-match.nw_dst = flow.nw_dst;* and in the action I did: * * *nwaction-nw_addr = htons(new_ip);* * * But it continue trying to send to IP *192.168.47.2...* The Wireshark continues showing these: *Ethernet II, Src: 5a:8c:01:8b:e0:fb (5a:8c:01:8b:e0:fb), Dst: 62:4c:de:97:90:e4 (62:4c:de:97:90:e4)* *Internet Protocol, Src: 192.168.47.1 (192.168.47.1), Dst: 192.168.47.2 (192.168.47.2) * The MAC adress is of host with IP 10.0.0.2. So the dataframes arrive in this host. But the destination IP continues without midifications. Any suggestion? Thank you very much. Best Regards. 2011/7/21 kk yap yap...@stanford.edu Hi Ricardo, Try matching on the old IP, then rewrite to the new IP. Regards KK On 20 July 2011 14:50, Ricardo Bennesby ricardo.benne...@gmail.com wrote: Hi all. I would like to forward packets from one host to another. I have the following topology: c0 c0 | | s3- s3 /\/ \ h1 h2h1 h2 Each host can ping each other. The two networks are connected by their switches (s3). In net1 h1 and h2 have IP 10.0.0.1 and 10.0.0.2. In net2 h1 and h2 have IP 192.168.47.1 and 192.168.47.2 I want that everytime I ping from some host in 192.168.47.2 the packets be forward to 10.0.0.2. I am using the switch.cc component and making some modifications on it. I set some actions to achieve this, using flow_mod and changing the out_port, destination mac_address and destination IP. Using wireshark, listening to the port where h2 (10.0.0.2) is, I saw that it got an ARP request from h1. So, looks like the packets arrive in the correct ethernet address, but it continue asking for 192.168.47.2. The destination IP was not modified. The code follows: if (flow.nw_dst == 36677824){//if destination ip=192.168.47.2 uint8_t no_of_actions_len = 56; uint8_t action_length = no_of_actions_len/(sizeof(struct ofp_action_header)); unsigned char *action_type = (unsigned char*)malloc(action_length*sizeof(struct ofp_action_header)); ofp_flow_mod* ofm; size_t size = sizeof *ofm + 7*sizeof(ofp_action_output); 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(0); ofm-match.wildcards = htonl(120 | 11); 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, new_mac.octet, sizeof ofm-match.dl_dst); ofm-match.dl_type = flow.dl_type; ofm-match.nw_src = flow.nw_src; ofm-match.nw_dst = new_ip; ofm-match.tp_src = flow.tp_src; ofm-match.tp_dst = flow.tp_dst; ofm-match.nw_proto = flow.nw_proto; ofm-match.nw_tos = flow.nw_tos; ofm-match.tp_src = flow.tp_src; ofm-cookie = htonl(0); ofm-command = htons(OFPFC_ADD); ofm-buffer_id = htonl(buffer_id); ofm-idle_timeout = htons(5); ofm-hard_timeout = htons(OFP_FLOW_PERMANENT); ofm-priority = htons(OFP_DEFAULT_PRIORITY); ofm-flags = htons(ofd_flow_mod_flags()); ofp_action_dl_addr *dlaction = (ofp_action_dl_addr *)malloc(sizeof(ofp_action_dl_addr)); dlaction-type = htons(OFPAT_SET_DL_DST); dlaction-len = htons(sizeof(ofp_action_dl_addr)); memcpy(dlaction-dl_addr, ofm-match.dl_dst, sizeof(ofm-match.dl_dst)); ofp_action_nw_tos *nw_tos = (ofp_action_nw_tos *)malloc(sizeof(ofp_action_nw_tos)); nw_tos-type = htons(OFPAT_SET_NW_TOS); nw_tos-len = htons(sizeof(ofp_action_nw_tos)); nw_tos-nw_tos = 0; ofp_action_tp_port *tp_src = (ofp_action_tp_port *)malloc(sizeof(ofp_action_tp_port)); tp_src-type = htons(OFPAT_SET_TP_SRC); tp_src-len = htons(sizeof(ofp_action_tp_port)); tp_src-tp_port = htons(0); ofp_action_tp_port *tp_dst = (ofp_action_tp_port *)malloc(sizeof(ofp_action_tp_port)); tp_dst-type = htons(OFPAT_SET_TP_DST
[nox-dev] Send packets to a host with different IP range
Hi all. How can I make one host ping another with a different IP range? For example host 1 (10.0.0.1) ping host 3 (200.0.0.1). I have one nox controller connected to a switch and three hosts. Can I do this changing something in switch component? Because I noticed that when h1 ping h2, the out_port is 1 and when h2 ping h1 the out_port is 2. But when h1 or h2 ping h3, the out_port is -1 and the packets aren' t received. Is there a way to achieve this? Thanks in advance. Best Regards. -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonoma ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Error in send a string using messenger component
Hi. Thanks for reply, KK. I am using the struct messenger_msg of messenger component: *struct messenger_msg { uint16_t length; uint8_t type; string body; } __attribute__ ((packed));* So, I declare and set the fields in my component: * messenger_msg mymsg; mymsg.type = 0x0A; mymsg.body.append(Test); mymsg.length = (sizeof(messenger_msg));* And the other part of the client (using socket): * int Mysocket, numbytes; char buf[MAXDATASIZE]; struct hostent *he; struct sockaddr_in seu_endereco; if ((he=gethostbyname(localhost)) == NULL) /* send host info */ { herror(gethostbyname); exit(1); } seu_endereco.sin_family = AF_INET; seu_endereco.sin_port = htons(PORTA); seu_endereco.sin_addr = *((struct in_addr *)he-h_addr); bzero((seu_endereco.sin_zero), 8); if (send(Mysocket, mymsg, mymsg.length, 0) == -1) { perror(send); close(Mysocket); exit(0); }* Where PORTA==2603; But when I run it, the server client (messenger) prints: 00077|messenger_core|DBG:Copy 8 bytes to message 00078|messenger|DBG:Check message completeness 512 (expected 512) 00079|messenger_core|DBG:Received packet of length 512 00080|messenger|DBG:Message posted as Msg_event 00081|messenger|DBG:Received packet of length 512 00082|messenger_core|DBG:Copy 2 bytes to message 00083|messenger|DBG:Check message completeness 2 (expected 62559) 00084|messenger_core|DBG:Copy 502 bytes to message 00085|messenger|DBG:Check message completeness 504 (expected 62559) 00086|messenger|DBG:me.msg-length: 512 and sizeof(messenger_msg)+1: 9 00087|messenger|DBG:Received string ��Q� The string Test is not printed. It shows ��Q� instead. What am I doing wrong? Is it the length of the message that I am setting doing *mymsg.length = (sizeof(messenger_msg))*; ? Or in the way I am using socket send function in client (*send(Mysocket, mymsg, mymsg.length, 0)*) ? Thanks for help. Best Regards. 2011/6/18 kk yap yap...@stanford.edu Hi Ricardo, You might want to add a length and type in front of the string. :) Regards KK On 18 June 2011 14:46, Ricardo Bennesby ricardo.benne...@gmail.com wrote: Hi. I am writing component in C++ that uses messenger component. I have a client function that send a string to the own component. As follows: void comp::sendMessageOtherAs(){ ClientSocket theSocket (localhost, 2603 ); string request; request = Test; theSocket request \n; lg.dbg(Echo sent); } The server part is did by messenger component, calling the handle_message function; But the result, when the handle_message is invoked is: 00108|messenger_core|DBG:Starting connection with idleInterval 0 00109|messenger_core|DBG:Received packet of length 0 00110|messenger|DBG:Message posted as Msg_event 00111|messenger_core|DBG:TCP socket connection accepted 00112|messenger_core|DBG:Copy 2 bytes to message 00113|messenger|DBG:Check message completeness 2 (expected 21349) 00114|messenger_core|DBG:Copy 31 bytes to message 00115|messenger|DBG:Check message completeness 33 (expected 21349) 00116|messenger_core|DBG:Received packet of length 3 00117|messenger_core|DBG:Received disconnection request 00118|messenger|DBG:Message posted as Msg_event 00119|messenger_core|DBG:socket closed And the handler messenger has the code: switch (me.msg-type) { case MSG_DISCONNECT: return STOP; break; case MSG_ECHO: VLOG_DBG(lg, Got echo request); reply_echo(me); return STOP; break; case MSG_ECHO_RESPONSE: VLOG_DBG(lg, Echo reply received); return STOP; break; case MSG_NOX_STR_CMD: char mstring[ntohs(me.msg-length)-sizeof(messenger_msg)+1]; memcpy(mstring, me.msg-body, ntohs(me.msg-length)-sizeof(messenger_msg)); mstring[ntohs(me.msg-length)-sizeof(messenger_msg)] = '\0'; VLOG_DBG(lg, Received string %s, mstring); break; } Shouldn't the message be of MSG_NOX_STR_CMD type and prints the string sent? Or the way I am sending the string is wrong? Sorry if I did'n made me clear. Thanks for help. Regards. -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autônoma ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autônoma ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Error in send a string using messenger component
Hi KK. I will take a look on it. Thank you very much. Regards. 2011/6/25 kk yap yap...@stanford.edu Hi Ricardo, You might want to take a closer look here http://noxrepo.org/~yapkke/doc/classvigil_1_1messenger.html http://noxrepo.org/~yapkke/doc/structvigil_1_1messenger__msg.html The struct messenger_msg is defined in messenger.hh as (and not what you presented in the email). struct messenger_msg { /** Length of message, including this header. */ uint16_t length; /** Type of message, as defined in \ref msg_type. */ uint8_t type; /** Reference to body of message. */ uint8_t body[0]; } __attribute__ ((packed)); Your packet length does seems way off to me at 512. The packet sent is not conforming to the expectation. Hope this helps. Regards KK On 25 June 2011 13:26, Ricardo Bennesby ricardo.benne...@gmail.com wrote: Hi. Thanks for reply, KK. I am using the struct messenger_msg of messenger component: struct messenger_msg { uint16_t length; uint8_t type; string body; } __attribute__ ((packed)); So, I declare and set the fields in my component: messenger_msg mymsg; mymsg.type = 0x0A; mymsg.body.append(Test); mymsg.length = (sizeof(messenger_msg)); And the other part of the client (using socket): int Mysocket, numbytes; char buf[MAXDATASIZE]; struct hostent *he; struct sockaddr_in seu_endereco; if ((he=gethostbyname(localhost)) == NULL) /* send host info */ { herror(gethostbyname); exit(1); } seu_endereco.sin_family = AF_INET; seu_endereco.sin_port = htons(PORTA); seu_endereco.sin_addr = *((struct in_addr *)he-h_addr); bzero((seu_endereco.sin_zero), 8); if (send(Mysocket, mymsg, mymsg.length, 0) == -1) { perror(send); close(Mysocket); exit(0); } Where PORTA==2603; But when I run it, the server client (messenger) prints: 00077|messenger_core|DBG:Copy 8 bytes to message 00078|messenger|DBG:Check message completeness 512 (expected 512) 00079|messenger_core|DBG:Received packet of length 512 00080|messenger|DBG:Message posted as Msg_event 00081|messenger|DBG:Received packet of length 512 00082|messenger_core|DBG:Copy 2 bytes to message 00083|messenger|DBG:Check message completeness 2 (expected 62559) 00084|messenger_core|DBG:Copy 502 bytes to message 00085|messenger|DBG:Check message completeness 504 (expected 62559) 00086|messenger|DBG:me.msg-length: 512 and sizeof(messenger_msg)+1: 9 00087|messenger|DBG:Received string ��Q� The string Test is not printed. It shows ��Q� instead. What am I doing wrong? Is it the length of the message that I am setting doing mymsg.length = (sizeof(messenger_msg)); ? Or in the way I am using socket send function in client (send(Mysocket, mymsg, mymsg.length, 0)) ? Thanks for help. Best Regards. 2011/6/18 kk yap yap...@stanford.edu Hi Ricardo, You might want to add a length and type in front of the string. :) Regards KK On 18 June 2011 14:46, Ricardo Bennesby ricardo.benne...@gmail.com wrote: Hi. I am writing component in C++ that uses messenger component. I have a client function that send a string to the own component. As follows: void comp::sendMessageOtherAs(){ ClientSocket theSocket (localhost, 2603 ); string request; request = Test; theSocket request \n; lg.dbg(Echo sent); } The server part is did by messenger component, calling the handle_message function; But the result, when the handle_message is invoked is: 00108|messenger_core|DBG:Starting connection with idleInterval 0 00109|messenger_core|DBG:Received packet of length 0 00110|messenger|DBG:Message posted as Msg_event 00111|messenger_core|DBG:TCP socket connection accepted 00112|messenger_core|DBG:Copy 2 bytes to message 00113|messenger|DBG:Check message completeness 2 (expected 21349) 00114|messenger_core|DBG:Copy 31 bytes to message 00115|messenger|DBG:Check message completeness 33 (expected 21349) 00116|messenger_core|DBG:Received packet of length 3 00117|messenger_core|DBG:Received disconnection request 00118|messenger|DBG:Message posted as Msg_event 00119|messenger_core|DBG:socket closed And the handler messenger has the code: switch (me.msg-type) { case MSG_DISCONNECT: return STOP; break; case MSG_ECHO: VLOG_DBG(lg, Got echo request); reply_echo(me); return STOP; break; case MSG_ECHO_RESPONSE: VLOG_DBG(lg, Echo reply received); return STOP; break; case MSG_NOX_STR_CMD: char mstring[ntohs(me.msg-length)-sizeof(messenger_msg)+1]; memcpy(mstring, me.msg-body
[nox-dev] Error in send a string using messenger component
Hi. I am writing component in C++ that uses messenger component. I have a client function that send a string to the own component. As follows: * void comp::sendMessageOtherAs(){ ClientSocket theSocket (localhost, 2603 ); string request; request = Test; theSocket request \n; lg.dbg(Echo sent); }* The server part is did by messenger component, calling the handle_message function; But the result, when the handle_message is invoked is: *00108|messenger_core|DBG:Starting connection with idleInterval 0 00109|messenger_core|DBG:Received packet of length 0 00110|messenger|DBG:Message posted as Msg_event 00111|messenger_core|DBG:TCP socket connection accepted 00112|messenger_core|DBG:Copy 2 bytes to message 00113|messenger|DBG:Check message completeness 2 (expected 21349) 00114|messenger_core|DBG:Copy 31 bytes to message 00115|messenger|DBG:Check message completeness 33 (expected 21349) 00116|messenger_core|DBG:Received packet of length 3 00117|messenger_core|DBG:Received disconnection request 00118|messenger|DBG:Message posted as Msg_event 00119|messenger_core|DBG:socket closed * And the handler messenger has the code: *switch (me.msg-type) { case MSG_DISCONNECT: return STOP; break; case MSG_ECHO: VLOG_DBG(lg, Got echo request); reply_echo(me); return STOP; break; case MSG_ECHO_RESPONSE: VLOG_DBG(lg, Echo reply received); return STOP; break; case MSG_NOX_STR_CMD: char mstring[ntohs(me.msg-length)-sizeof(messenger_msg)+1]; memcpy(mstring, me.msg-body, ntohs(me.msg-length)-sizeof(messenger_msg)); mstring[ntohs(me.msg-length)-sizeof(messenger_msg)] = '\0'; VLOG_DBG(lg, Received string %s, mstring); break; }* Shouldn't the message be of MSG_NOX_STR_CMD type and prints the string sent? Or the way I am sending the string is wrong? Sorry if I did'n made me clear. Thanks for help. Regards. -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autônoma ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
[nox-dev] How to change a Flow destination in a nox component
Hi all. I would like some help in how can I change the destination of a flow that arrives on nox controller before send it back to switch. For example, I want that in a network with three hosts, when a host 1 pings to host 2, the component (switch.cc) makes the datapath forward it to host 3. If I chande only the flow destination IP (from 10.0.0.2 to 10.0.0.3, for example) the packets continue being forwarded normally to host 2. Should I change all the flow fields in switch component, like mac, in_port, etc? Is this the right way? Thank you very much for your help and attention. Best regards. -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonôma ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] How to change a Flow destination in a nox component
Hi Murphy. Thank you very much for help. Interesting. I will consider the ethernet addresses to change the destination, once the component is a L2 switch. Any results I post a feedback here. Regards. 2011/6/3 Murphy McCauley jam...@nau.edu The switch component is an L2 learning switch, so it makes its decisions based on ethernet addresses. It makes this decision for every new flow, but only based on the ethernet address. Once the decision is made, an exact match flow is installed (if I recall correctly) that will direct that flow out whatever port it learned the destination ethernet address is connected to (or all ports if it doesn't know where the destination is). So if you want to use the switch component to send traffic somewhere specific, it's the ethernet address that's important. I'm not sure if that helps or not -- maybe we could provide a better answer if you explained more fully what you're trying to do. -- Murphy On Friday, June 03, 2011 09:50:08 AM Ricardo Bennesby wrote: Hi all. I would like some help in how can I change the destination of a flow that arrives on nox controller before send it back to switch. For example, I want that in a network with three hosts, when a host 1 pings to host 2, the component (switch.cc) makes the datapath forward it to host 3. If I chande only the flow destination IP (from 10.0.0.2 to 10.0.0.3, for example) the packets continue being forwarded normally to host 2. Should I change all the flow fields in switch component, like mac, in_port, etc? Is this the right way? Thank you very much for your help and attention. Best regards. -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Nox Application with dijkastra
Hi Marwen. Nox routing implements OSPF protocol and It is based on Dijkstra algorithm (also called SPF). In this algorithm, the component knows the data of all nodes in the network. Hope it helped. Best Regards. 2011/5/19 marwen mechtri mechtri.mar...@gmail.com Hi all, I'm exploring routing, sample_routing and switch module of Nox but when I configure a partial mesh network this modules don't give any result. Could you tell me if this modules use dijkstra to calculate Path between source and destination. And if not, do you know a module that use dijkstra or any kind of method to calculate source to destination Path, could you please give me its name. Thinks Best regards Marwen ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonoma ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Flow collection- error
Hi Paulo and kk! You are right! Problem solved. Thank you very much for your help. Best Regards. 2011/3/21 Paulo César pcd...@gmail.com Hi, Ricardo. I solved this problem. Try to use ntohll() to uint64 and ntohs() to uint32*.* Best regards. *** * 2011/3/21 Paulo César pcd...@gmail.com Hi, I am having the same problem. Any help? Best regards. 2011/3/20 Ricardo Bennesby ricardo.benne...@gmail.com Sorry, forgot to paste that... fsie is from Flow_stats_in event, declared in a handle_flow_stats_in method (a handler): Disposition newcomp::handle_flow_stats_in(const Event e){ *const Flow_stats_in_event fsie* = assert_castconst Flow_stats_in_event(e); So, fsie.flows has that informations about the flows, that can be used to collect statistcs. Thanks for help. Regards. 2011/3/20 kk yap yap...@stanford.edu Ricardo, Can you explain which component is fsie as with * fsie.flows.at(i) Regards KK On 20 March 2011 13:11, Ricardo Bennesby ricardo.benne...@gmail.com wrote: Thanks kk. I think I did what you suggested: uint32_t ds; //duration_sec uint64_t pc; //packet_count uint16_t pri; //priority uint64_t bc; //byte_count uint16_t len; //legth uint8_t tid; //table_id for(int i=0;ifsie.flows.size();i++){ lg.dbg(i value: %d,i); ds = ntohl(fsie.flows.at(i).duration_sec); pc = ntohl(fsie.flows.at(i).packet_count); pri = ntohl(fsie.flows.at(i).priority); bc = ntohl(fsie.flows.at(i).byte_count); len = ntohl(fsie.flows.at(i).length); tid = ntohl(fsie.flows.at(i).table_id); lg.dbg(duration_sec: %PRIu32,ds); lg.dbg(packet_count: %PRIu64,pc); lg.dbg(priority: %PRIu16,pri); lg.dbg(byte_count: %PRIu64,bc); lg.dbg(length: %PRIu16,len); lg.dbg(table_id: %PRIu8,tid); } But now only number of flows and duration in seconds are non-zero: 00238|newcomp|DBG:Size of flows: 2 00239|newcomp|DBG:i value: 0 00240|newcomp|DBG:duration_sec: 8 00241|newcomp|DBG:packet_count: 0 00242|newcomp|DBG:priority: 0 00243|newcomp|DBG:byte_count: 0 00244|newcomp|DBG:length: 0 00245|newcomp|DBG:table_id: 0 00246|newcomp|DBG:i value: 1 00247|newcomp|DBG:duration_sec: 7 00248|newcomp|DBG:packet_count: 0 00249|newcomp|DBG:priority: 0 00250|newcomp|DBG:byte_count: 0 00251|newcomp|DBG:length: 0 00252|newcomp|DBG:table_id: 0 What am I missing? Sorry to bother. Regards. 2011/3/20 kk yap yap...@stanford.edu Hi Ricardo, I mean the result. Did you run ntohx on them. Regards KK On 20 March 2011 10:50, Ricardo Bennesby ricardo.benne...@gmail.com wrote: Hi kk, thanks for quick reply. I changed request.match.wildcards = htonl(0x) to: request.match.wildcards = htons(0x); - but it didn't work. Nothing was printed about the packets request.match.wildcards = ntohs(0x); - the same that happened with htons request.match.wildcards = ntohl(0x); - the same result of use htonl Sorry kk, but still I missing something? 2011/3/20 kk yap yap...@stanford.edu Hi Ricardo, Did you consider network/host byte order? Regards KK On 20 March 2011 10:01, Ricardo Bennesby ricardo.benne...@gmail.com wrote: Hi. I am running a C++ component that prints statistics of flows collected in switches with the flow_stats_in_event. I am also running the dpctl dump-flows command in mininet to compare the values and they are very different. The request is as follows: request.table_id = 0xff; request.out_port = OFPP_NONE; request.match.wildcards = htonl(0x); Some values printed with dpctl dump-flows are: cookie=0, duration_sec=6s, table_id=1, priority=32768, n_packets=9, n_bytes=882 And it seems correct. In Flow_stats_in_event handler I wrote: if(fsie.flows.size()0){ lg.dbg(duration_sec: %PRIu32,fsie.flows.at(0).duration_sec); lg.dbg(packet_count: %PRIu64,fsie.flows.at(0).packet_count); lg.dbg(priority: %PRIu16,fsie.flows.at(0).priority); lg.dbg(byte_count: %PRIu64,fsie.flows.at(0).byte_count); lg.dbg(length: %d,fsie.flows.at(0).length); lg.dbg(table_id: %d,fsie.flows.at (0).table_id); } But the values printed are: 00533|openflow-event|DBG:received stats reply from 0001 00534|newcomp|DBG:Size of flows: 2 00535|newcomp|DBG:duration_sec: 922746880 00536|newcomp|DBG:packet_count: 7710162562058289152 00537|newcomp|DBG:priority: 128
[nox-dev] Flow collection- error
Hi. I am running a C++ component that prints statistics of flows collected in switches with the flow_stats_in_event. I am also running the dpctl dump-flows command in mininet to compare the values and they are very different. The request is as follows: *request.table_id = 0xff; request.out_port = OFPP_NONE; request.match.wildcards = htonl(0x);* Some values printed with *dpctl dump-flows* are: *cookie=0, duration_sec=6s, table_id=1, priority=32768, n_packets=9, n_bytes=882* And it seems correct. In Flow_stats_in_event handler I wrote: if(fsie.flows.size()0){ lg.dbg(duration_sec: %PRIu32,fsie.flows.at (0).duration_sec); lg.dbg(packet_count: %PRIu64,fsie.flows.at (0).packet_count); lg.dbg(priority: %PRIu16,fsie.flows.at(0).priority); lg.dbg(byte_count: %PRIu64,fsie.flows.at(0).byte_count); lg.dbg(length: %d,fsie.flows.at(0).length); lg.dbg(table_id: %d,fsie.flows.at(0).table_id); } But the values printed are: *00533|openflow-event|DBG:received stats reply from 0001 00534|newcomp|DBG:Size of flows: 2 00535|newcomp|DBG:duration_sec: 922746880 00536|newcomp|DBG:packet_count: 7710162562058289152 00537|newcomp|DBG:priority: 128 00538|newcomp|DBG:byte_count: 17737427132398698496 00539|newcomp|DBG:length: 24576 00540|newcomp|DBG:table_id: 1 *What am I missing?* *If I wasn't detailed enough please let me know.* *Best Regards. -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Flow collection- error
Sorry, forgot to paste that... fsie is from Flow_stats_in event, declared in a handle_flow_stats_in method (a handler): Disposition newcomp::handle_flow_stats_in(const Event e){ *const Flow_stats_in_event fsie* = assert_castconst Flow_stats_in_event(e); So, fsie.flows has that informations about the flows, that can be used to collect statistcs. Thanks for help. Regards. 2011/3/20 kk yap yap...@stanford.edu Ricardo, Can you explain which component is fsie as with * fsie.flows.at(i) Regards KK On 20 March 2011 13:11, Ricardo Bennesby ricardo.benne...@gmail.com wrote: Thanks kk. I think I did what you suggested: uint32_t ds; //duration_sec uint64_t pc; //packet_count uint16_t pri; //priority uint64_t bc; //byte_count uint16_t len; //legth uint8_t tid; //table_id for(int i=0;ifsie.flows.size();i++){ lg.dbg(i value: %d,i); ds = ntohl(fsie.flows.at(i).duration_sec); pc = ntohl(fsie.flows.at(i).packet_count); pri = ntohl(fsie.flows.at(i).priority); bc = ntohl(fsie.flows.at(i).byte_count); len = ntohl(fsie.flows.at(i).length); tid = ntohl(fsie.flows.at(i).table_id); lg.dbg(duration_sec: %PRIu32,ds); lg.dbg(packet_count: %PRIu64,pc); lg.dbg(priority: %PRIu16,pri); lg.dbg(byte_count: %PRIu64,bc); lg.dbg(length: %PRIu16,len); lg.dbg(table_id: %PRIu8,tid); } But now only number of flows and duration in seconds are non-zero: 00238|newcomp|DBG:Size of flows: 2 00239|newcomp|DBG:i value: 0 00240|newcomp|DBG:duration_sec: 8 00241|newcomp|DBG:packet_count: 0 00242|newcomp|DBG:priority: 0 00243|newcomp|DBG:byte_count: 0 00244|newcomp|DBG:length: 0 00245|newcomp|DBG:table_id: 0 00246|newcomp|DBG:i value: 1 00247|newcomp|DBG:duration_sec: 7 00248|newcomp|DBG:packet_count: 0 00249|newcomp|DBG:priority: 0 00250|newcomp|DBG:byte_count: 0 00251|newcomp|DBG:length: 0 00252|newcomp|DBG:table_id: 0 What am I missing? Sorry to bother. Regards. 2011/3/20 kk yap yap...@stanford.edu Hi Ricardo, I mean the result. Did you run ntohx on them. Regards KK On 20 March 2011 10:50, Ricardo Bennesby ricardo.benne...@gmail.com wrote: Hi kk, thanks for quick reply. I changed request.match.wildcards = htonl(0x) to: request.match.wildcards = htons(0x); - but it didn't work. Nothing was printed about the packets request.match.wildcards = ntohs(0x); - the same that happened with htons request.match.wildcards = ntohl(0x); - the same result of use htonl Sorry kk, but still I missing something? 2011/3/20 kk yap yap...@stanford.edu Hi Ricardo, Did you consider network/host byte order? Regards KK On 20 March 2011 10:01, Ricardo Bennesby ricardo.benne...@gmail.com wrote: Hi. I am running a C++ component that prints statistics of flows collected in switches with the flow_stats_in_event. I am also running the dpctl dump-flows command in mininet to compare the values and they are very different. The request is as follows: request.table_id = 0xff; request.out_port = OFPP_NONE; request.match.wildcards = htonl(0x); Some values printed with dpctl dump-flows are: cookie=0, duration_sec=6s, table_id=1, priority=32768, n_packets=9, n_bytes=882 And it seems correct. In Flow_stats_in_event handler I wrote: if(fsie.flows.size()0){ lg.dbg(duration_sec: %PRIu32,fsie.flows.at(0).duration_sec); lg.dbg(packet_count: %PRIu64,fsie.flows.at(0).packet_count); lg.dbg(priority: %PRIu16,fsie.flows.at(0).priority); lg.dbg(byte_count: %PRIu64,fsie.flows.at(0).byte_count); lg.dbg(length: %d,fsie.flows.at(0).length); lg.dbg(table_id: %d,fsie.flows.at(0).table_id); } But the values printed are: 00533|openflow-event|DBG:received stats reply from 0001 00534|newcomp|DBG:Size of flows: 2 00535|newcomp|DBG:duration_sec: 922746880 00536|newcomp|DBG:packet_count: 7710162562058289152 00537|newcomp|DBG:priority: 128 00538|newcomp|DBG:byte_count: 17737427132398698496 00539|newcomp|DBG:length: 24576 00540|newcomp|DBG:table_id: 1 What am I missing? If I wasn't detailed enough please let me know. Best Regards. -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing
[nox-dev] Problem in getting flows statistics
Hi, I am trying to get flows statistics in my C++ component using flow fetcher, but all fields of flows seems not instanciated. For example, I need to know flow size, number of packets, number of bytes and other information. I created a *ofp_flow_stats_request request* in my component, set it as: *request.table_id = 0xff; request.out_port = OFPP_NONE;* , in datapath_join_event and passed it to flow_fetcher as a parameter of start_fetch. But when the handler of Flow_stats_in_event is called, the size of the *vectorFlow_stats flows* still zero as all of it other fields. Is the error in my request? Am I missing something? Sorry if I didn't made myself clear. Thank you for help. Regards. -- Happy Women's Day Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Problem in getting flows statistics
Hi Malveeka, thanks for quick answer. Using with Python flow fetcher worked fine too, but with C++ I am having these problems... The ofp_flow_stats_request is a struct that has the fields: * struct ofp_match match*; /* Fields to match. */ *uint8_t table_id*; /* ID of table to read (from ofp_table_stats), 0xff for all tables or 0xfe for emergency. */ *uint8_t pad*; /* Align to 32 bits. */ *uint16_t out_port*; I didn't change the way that Flow_fetcher request the flows. So, the *flows* vector is only instantiated when the *send_openflow_command(dpid, oh, false)* is sent (oh is a ofp_header type) and when there are matching entries? Thank you so much for help. 2011/3/8 malve...@cs.ucsd.edu Hi Ricardo I've used the nox flow fetcher component and it worked fine for me. One thing to look at is how you're specifying the ofp_match object while requesting for flows. The ofp_flow_stats_request will return counters for flow table entries that match the specified ofp_match object ? If there no matching entries in the forwarding table Flow_statsflows vector will be empty. Hope this helped Best! Malveeka - Original Message - From: Ricardo Bennesby ricardo.benne...@gmail.com To: nox-dev@noxrepo.org Sent: Tuesday, March 8, 2011 1:01:44 PM GMT -08:00 US/Canada Pacific Subject: [nox-dev] Problem in getting flows statistics Hi, I am trying to get flows statistics in my C++ component using flow fetcher, but all fields of flows seems not instanciated. For example, I need to know flow size, number of packets, number of bytes and other information. I created a *ofp_flow_stats_request request* in my component, set it as: *request.table_id = 0xff; request.out_port = OFPP_NONE;* , in datapath_join_event and passed it to flow_fetcher as a parameter of start_fetch. But when the handler of Flow_stats_in_event is called, the size of the *vectorFlow_stats flows* still zero as all of it other fields. Is the error in my request? Am I missing something? Sorry if I didn't made myself clear. Thank you for help. Regards. -- Happy Women's Day Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- Happy Women's Day Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Problem in getting flows statistics
I tried it but the flows size still zero. I will do what you suggested. I will check the switch entries. When I did this I post a feedback. Thank you so much for help, Malveeka. Best regards. 2011/3/8 malve...@cs.ucsd.edu Yes I am using the C++ flow fetcher component. When you send a flow stats request you also specify a ofp_match field as well, Openflow internally matches the flow entries in the switch's flow table and returns counters for matching flows. Try the following ofp_flow_stats_request fsr; fsr.table_id = 0xff; fsr.match.wildcards = htonl(0x); //this would match all the flows in the forwarding table fsr.out_port = OFPP_NONE; Here I have wildcarded all matching fields, which means it will match all the flows in the switch's forwarding table. This works for me .. If this doesn't work for you then the next question then is -- are there any forwarding entries installed in the switch? Good luck, Malveeka - Original Message - From: Ricardo Bennesby ricardo.benne...@gmail.com To: malve...@cs.ucsd.edu Sent: Tuesday, March 8, 2011 1:51:47 PM GMT -08:00 US/Canada Pacific Subject: Re: [nox-dev] Problem in getting flows statistics Did you used it with C++ too? 2011/3/8 malve...@cs.ucsd.edu Hi Ricardo I've used the nox flow fetcher component and it worked fine for me. One thing to look at is how you're specifying the ofp_match object while requesting for flows. The ofp_flow_stats_request will return counters for flow table entries that match the specified ofp_match object ? If there no matching entries in the forwarding table Flow_statsflows vector will be empty. Hope this helped Best! Malveeka - Original Message - From: Ricardo Bennesby ricardo.benne...@gmail.com To: nox-dev@noxrepo.org Sent: Tuesday, March 8, 2011 1:01:44 PM GMT -08:00 US/Canada Pacific Subject: [nox-dev] Problem in getting flows statistics Hi, I am trying to get flows statistics in my C++ component using flow fetcher, but all fields of flows seems not instanciated. For example, I need to know flow size, number of packets, number of bytes and other information. I created a *ofp_flow_stats_request request* in my component, set it as: *request.table_id = 0xff; request.out_port = OFPP_NONE;* , in datapath_join_event and passed it to flow_fetcher as a parameter of start_fetch. But when the handler of Flow_stats_in_event is called, the size of the *vectorFlow_stats flows* still zero as all of it other fields. Is the error in my request? Am I missing something? Sorry if I didn't made myself clear. Thank you for help. Regards. -- Happy Women's Day Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
[nox-dev] Flow_stats_in_event - Flows size
Hi all. I am using Flow Fetcher component with my component. The flow_stats_in_event handler is called, but the fsie.flows size is zero. Should not this have a non-zero value? The code of this function is following: Disposition Flow_fetcher::handle_flow_stats_in(const Event e) { const Flow_stats_in_event fsie = assert_castconst Flow_stats_in_event(e); Fetcher_map::iterator i(lookup_xid(fsie.xid())); if (i == active_fetchers.end()) { lg.dbg(ignoring Flow_stats_in_event with unknown xid %PRIu32, fsie.xid()); return CONTINUE; } /* Append the new flows. Unless there are more flows to come, declare * it a success. */ ff-flows.insert(ff-flows.end(), fsie.flows.begin(), fsie.flows.end()); *lg.dbg(Flows size: %d,fsie.flows.size());* if (fsie.more) { ff-touch(); } else { ff-complete(0); ff-status = -1; active_fetchers.erase(i); } return STOP; } If you need some deeper detail please let me know it. Best Regards. -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] Problem with different instances of an attribute
I did what you suggested and it worked! Thanks for help. Best Regards. 2011/2/19 Murphy McCauley jam...@nau.edu So putting static on a member in a class declaration is only a declaration -- you still need a definition. This is done outside of the class declaration itself (much like how most methods at declared in the class declaration but defined elsewhere). So generally this means that if you add static Fetcher_map active_fetchers; to the class declaration for the class MyClass in MyClass.hh, you then add something like the following in your MyClass.cc: Fetcher_map MyClass::active_fetchers; Hope that helps. -- Murphy On Feb 18, 2011, at 8:12 PM, Ricardo Bennesby wrote: Hi. I declared the attribute with static modifier in header file as follows: private: static Fetcher_map active_fetchers; But it doesn't compile when I put the static modifier. This accessed in .cc file in different methods and initialized. But when it is accessed in methods called by event handlers, as flow_stats_in, it seems that another instance of active_fetcher is created, because it size is zero. So I would like to know if I am using the correct modifier or if I can have the same instance of class some other manner, without using modifiers. Thank you so much. 2011/2/18 Murphy McCauley jam...@nau.edu You say you tried to use the static modifier but it didn't work. Could you explain a bit more what you mean by didn't work? Didn't compile? Didn't have the expected results? Also, a short code snippet might be helpful. -- Murphy On Feb 17, 2011, at 4:37 PM, Ricardo Bennesby wrote: Hi all, I am developing a component using C++ and I am having the following problem: In header file, in the definition of a class, I declared an attribute and I want that this attribute belongs to the class and not to a instance of this class. I tried to use static modifier but it didn't work. It seems to me that handlers of events create different instances of the class. For example, the method handle_flow_stats_in inserts elements in a object of the type Fetcher_map but the handle_datapath_join indicates that the size of object is still zero. Sorry if I didn't make myself clear. Any suggestions? -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
[nox-dev] C++ Posting Timer Error
Hi, I am writing a component in C++ that uses a timer. In the .hh file I put: *Timer post(const Timer_Callback, const timeval duration) const; Disposition handle_datapath_join(const Event e);* And in the .cc file there is a post that calls a timer method: *#include timeval.hh #include timer-dispatcher.hh* * Disposition newcomp::handle_datapath_join(const Event e) { timeval tv={1,0}; post(boost::bind(newcomp::timer,this), tv); return CONTINUE; } * And the timer method:* void newcomp::timer() { lg.dbg(One second has passed...\n); } * It compiles normally but when I tried to execute it, I got the following message: *00043|nox|ERR:Cannot change the state of 'newcomp' to INSTALLED: 'newcomp' ran into an error: Can't open a dynamic library: 'nox/netapps/newcomp/newcomp.so: cannot open shared object file: No such file or directory' or 'nox/netapps/newcomp/.libs/newcomp.so: undefined symbol: vigil::applications::newcomp::post(boost::functionvoid ()() const, timeval const) const' *Any suggestions to solve this problems? Best Regards.* * -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autônoma ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
[nox-dev] Messenger
Hi all. I would like to use Messenger component to send a message from a host to Nox and from Nox to a host. But the directory messenger has only the following files: *-messenger_core.la -messenger_core_la-messenger_core.lo -jsonmessenger.la -jsonmessenger_la-jsonmessenger.lo -messenger.la -messenger_la-messenger.lo -msgpacket.la -msgpacket_la-msgpacket.lo -meta.xml -Makefile* Doesn't exists any C++ or Python messenger component as example or I have to install / configure it? I am using VMWare and Nox 0.8. Best Regards. -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] RES: Messenger
Hi, thank you for the answers. Alexandre, as KK suggested instead of looking in the build directory I searched in the ~/noxcore/src/nox/coreapps/messenger directory and there you can find jsonmessenger.cc, messenger.cc, messenger_core.cc, and others. Hope it helps you. Thank for help me. Regards. Ricardo Bennesby ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] Routing in Nox
Thanks Kyriakos for the quick answer. Sorry to bother, but if I want to have differents networks communicating with each other using routing tables to forward packets, the routing module doesn't offers support to this funcionality? So it need to be implemented yet? Regards. ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] dropping packets
Hello ikf. Some months ago I was with a similar issue. I was trying to do a test droping packets. I modified the component called pyswitch.py. This is my post: *Thanks Martin. I was looking the code of pyswitch.py and I found this: # don't forward lldp packets if packet.type == ethernet.LLDP_TYPE: return CONTINUE So, if I want to drop any kind of packet is just to specify its type? Like use packet.type == ethernet.TCP_TYPE to drop packet of tcp protocol? Thank you again for help me. * And he answered: *If you want to drop packets at the controller, then yes, you can simply return CONTINUE in a packet handler after checking the type. If you'd like packets to be dropped at the switch, you should install a flow entry with no actions which matches on the packets you'd like dropped. This is preferable since you don't exhaust bandwidth to the controller for packets which will ultimately be dropped* I don't know if this will help you, but maybe you can try it. Anyway, good luck. ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] dropping packets
Hi KK. Thank you for reply. But just to have sure, in the pyswitch.py component there are originally in lines 140-149: * # don't forward lldp packets if packet.type == ethernet.LLDP_TYPE: return CONTINUE # learn MAC on incoming port do_l2_learning(dpid, inport, packet) forward_l2_packet(dpid, inport, packet, packet.arr, bufid) return CONTINUE * Doesn't it mean that the lldp packets are dropped, because no actions are specified and they are not forward? Thanks again. I agree with you when you say that the community participation is very important. If I'm wrong, please correct me. Regards. ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] dropping packets
Hi KK and Richard, Thank you for the answers. I understand it better now. Regards. ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org