##DS Homework2##
####Step 1####
- Create your stack object, which can be instanced by float or char.
- You can use template to implement or write two codes.
- you stack must provide (push,pop,isempty).
####Step 2####
##DS Homework2##
####Step 1####
####Step 2####
#include<iostream> | |
using namespace std; | |
//Write your stack here | |
int main(){ | |
//Create two stack, one for float number, one for operator. |
#include<iostream> | |
#include<fstream> | |
#include <cstdlib> | |
using namespace std; | |
#define NUM 100 | |
class Stackf | |
{ | |
private: | |
int top; |
Controller:sudo java -jar target/floodlight.jar
Mininet:sudo mn --mac --controller=remote,ip=127.0.0.1 --topo tree,2
Controller:curl -d '{"switch": "00:00:00:00:00:00:00:02", "name":"flow-mod-1", "priority":"32768", "ingress-port":"1" , "src-mac":"00:00:00:00:00:01", "dst-mac":"00:00:00:00:00:02", "active":"true","actions":"set-dst-ip=10.0.0.4,set-dst-mac=00:00:00:00:00:04,output=3"}' http://127.0.0.1:8080/wm/staticflowentrypusher/json
Mininet:h1 ping h2
Result:
mininet> h1 ping h2
#include<stdlib.h> | |
#include<stdio.h> | |
#include<string.h> | |
int main(void) | |
{ | |
char buf[1010]; | |
int sumo,sume,i,result; | |
while(fgets(buf,sizeof(buf),stdin)){ | |
if(strlen(buf)==2 && buf[0]=='0') | |
return 0; |
Flow path highlight
Detail flow statistics
#!/usr/bin/perl | |
select(STDOUT); | |
$| = 2; | |
while (<>) { | |
print "[".localtime()."] $_" | |
} |
#!/usr/bin/python | |
""" | |
Example to create a Mininet topology and connect it to the internet via NAT | |
through eth0 on the host. | |
Glen Gibb, February 2011 | |
(slight modifications by BL, 5/13) | |
""" |
##SDN## ###Definition https://www.opennetworking.org/sdn-resources/sdn-definition
##Openflow##
#include<iostream> | |
using namespace std; | |
int rightLine,leftLine,upperLine,downLine; | |
int t1,t2,t3,t4; | |
int main(){ | |
int times; | |
int count; | |
cin >> times; | |
for(int i=0;i<times;i++){ | |
cin >> count; |