介绍

拓扑如下:

在该环境下,假设H1 ping H4,初始的路由规则是S1-S2-S5,一秒后,路由转发规则变为S1-S3-S5,再过一秒,规则变为S1-S4-S5,然后再回到最初的转发规则S1-S2-S5。通过这个循环调度的例子动态地改变交换机的转发规则。


pox脚本

pox脚本lab_controller.py

不得不说这脚本问题是真的多。

 from pox.core import core

 import pox.openflow.libopenflow_01 as of

 from pox.lib.util import dpidToStr

 from pox.lib.addresses import IPAddr, EthAddr

 from pox.lib.packet.arp import arp

 from pox.lib.packet.ethernet import ethernet, ETHER_BROADCAST

 from pox.lib.packet.packet_base import packet_base

 from pox.lib.packet.packet_utils import *

 import pox.lib.packet as pkt

 from pox.lib.recoco import Timer

 import time

 log = core.getLogger()

 s1_dpid = 0

 s2_dpid = 0

 s3_dpid = 0

 s4_dpid = 0

 s5_dpid = 0

 s1_p1 = 0

 s1_p4 = 0

 s1_p5 = 0

 s1_p6 = 0

 s2_p1 = 0

 s3_p1 = 0

 s4_p1 = 0

 pre_s1_p1 = 0

 pre_s1_p4 = 0

 pre_s1_p5 = 0

 pre_s1_p6 = 0

 pre_s2_p1 = 0

 pre_s3_p1 = 0

 pre_s4_p1 = 0

 turn = 0

 def getTheTime():  # fuction to create a timestamp

     flock = time.localtime()

     then = "[%s-%s-%s" % (str(flock.tm_year),
str(flock.tm_mon), str(flock.tm_mday)) if int(flock.tm_hour) < 10: hrs = "0%s" % (str(flock.tm_hour)) else: hrs = str(flock.tm_hour) if int(flock.tm_min) < 10: mins = str(flock.tm_min) secs = "0%s" % (str(flock.tm_sec)) else: secs = str(flock.tm_sec) then += "]%s.%s.%s" % (hrs, mins, secs) return then def _timer_func():
global s1_dpid, s2_dpid, s3_dpid, s4_dpid, s5_dpid, turn # print getTheTime(), "sent the port stats request to s1_dpid" if turn == 0:
msg = of.ofp_flow_mod() msg.command = of.OFPFC_MODIFY_STRICT msg.priority = 100 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.dl_type = 0x0800 msg.match.nw_dst = "10.0.0.4" msg.actions.append(of.ofp_action_output(port=5)) core.openflow.getConnection(s1_dpid).send(msg) turn = 1 return if turn == 1:
msg = of.ofp_flow_mod() msg.command = of.OFPFC_MODIFY_STRICT msg.priority = 100 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.dl_type = 0x0800 msg.match.nw_dst = "10.0.0.4" msg.actions.append(of.ofp_action_output(port=6)) core.openflow.getConnection(s1_dpid).send(msg) turn = 2
return if turn == 2:
msg = of.ofp_flow_mod() msg.command = of.OFPFC_MODIFY_STRICT msg.priority = 100 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.dl_type = 0x0800 msg.match.nw_dst = "10.0.0.4" msg.actions.append(of.ofp_action_output(port=4)) turn = 0 return def _handle_portstats_received(event):
global s1_p1, s1_p4, s1_p5, s1_p6, s2_p1, s3_p1, s4_p1 global pre_s1_p1, pre_s1_p4, pre_s1_p5, pre_s1_p6, pre_s2_p1, pre_s3_p1, pre_s4_p1 if event.connection.dpid == s1_dpid: for f in event.stats: if int(f.port_no) < 65534: if f.port_no == 1:
pre_s1_p1 = s1_p1 s1_p1 = f.rx_packets if f.port_no == 4:
pre_s1_p4 = s1_p4 s1_p4 = f.tx_packets # s1_p4=f.tx_bytes if f.port_no == 5:
pre_s1_p5 = s1_p5 s1_p5 = f.tx_packets if f.port_no == 6:
pre_s1_p6 = s1_p6 s1_p6 = f.tx_packets for f in event.stats: if int(f.port_no) < 65534: if f.port_no == 1:
pre_s2_p1 = s2_p1 s2_p1 = f.rx_packets # s2_p1=f.rx_bytes if event.connection.dpid == s3_dpid: for f in event.stats: if int(f.port_no) < 65534: if f.port_no == 1:
pre_s3_p1 = s3_p1 s3_p1 = f.rx_packets if event.connection.dpid == s4_dpid: for f in event.stats: if int(f.port_no) < 65534: if f.port_no == 1:
pre_s4_p1 = s4_p1 s4_p1 = f.rx_packets def _handle_ConnectionUp(event):
global s1_dpid, s2_dpid, s3_dpid, s4_dpid, s5_dpid print "ConnectionUp: ", dpidToStr(event.connection.dpid) # remember the connection dpid for switch for m in event.connection.features.ports: if m.name == "s1-eth1": s1_dpid = event.connection.dpid print "s1_dpid=", s1_dpid elif m.name == "s2-eth1": s2_dpid = event.connection.dpid print "s2_dpid=", s2_dpid elif m.name == "s3-eth1": s3_dpid = event.connection.dpid print "s3_dpid=", s3_dpid elif m.name == "s4-eth1": s4_dpid = event.connection.dpid print "s4_dpid=", s4_dpid elif m.name == "s5-eth1": s5_dpid = event.connection.dpid print "s5_dpid=", s5_dpid if s1_dpid <> 0 and s2_dpid <> 0 and s3_dpid <> 0 and s4_dpid <> 0:
Timer(1, _timer_func, recurring=True) def _handle_PacketIn(event):
global s1_dpid, s2_dpid, s3_dpid, s4_dpid, s5_dpid packet = event.parsed if event.connection.dpid == s1_dpid: a = packet.find('arp') if a and a.protodst == "10.0.0.4":
msg = of.ofp_packet_out(data=event.ofp) msg.actions.append(of.ofp_action_output(port=4)) event.connection.send(msg) if a and a.protodst == "10.0.0.5":
msg = of.ofp_packet_out(data=event.ofp) msg.actions.append(of.ofp_action_output(port=5)) event.connection.send(msg) if a and a.protodst == "10.0.0.6":
msg = of.ofp_packet_out(data=event.ofp) msg.actions.append(of.ofp_action_output(port=6)) event.connection.send(msg) if a and a.protodst == "10.0.0.1":
msg = of.ofp_packet_out(data=event.ofp) msg.actions.append(of.ofp_action_output(port=1)) event.connection.send(msg) if a and a.protodst == "10.0.0.2":
msg = of.ofp_packet_out(data=event.ofp) msg.actions.append(of.ofp_action_output(port=2)) event.connection.send(msg) if a and a.protodst == "10.0.0.3":
msg = of.ofp_packet_out(data=event.ofp) msg.actions.append(of.ofp_action_output(port=3)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 100 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.dl_type = 0x0800 msg.match.nw_dst = "10.0.0.1" msg.actions.append(of.ofp_action_output(port=1)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 100 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.dl_type = 0x0800 msg.match.nw_dst = "10.0.0.2" msg.actions.append(of.ofp_action_output(port=2)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 100 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.dl_type = 0x0800 msg.match.nw_dst = "10.0.0.3" msg.actions.append(of.ofp_action_output(port=3)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 100 msg.idle_timeout = 0 msg.hard_timeout = 1 msg.match.dl_type = 0x0800 msg.match.nw_dst = "10.0.0.4" msg.actions.append(of.ofp_action_output(port=4)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 100 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.dl_type = 0x0800 msg.match.nw_dst = "10.0.0.5" msg.actions.append(of.ofp_action_output(port=5)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 100 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.dl_type = 0x0800 msg.match.nw_dst = "10.0.0.6" msg.actions.append(of.ofp_action_output(port=6)) event.connection.send(msg) elif event.connection.dpid == s2_dpid: msg = of.ofp_flow_mod() msg.priority = 10 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.in_port = 1 msg.match.dl_type = 0x0806 msg.actions.append(of.ofp_action_output(port=2)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 10 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.in_port = 1 msg.match.dl_type = 0x0800 msg.actions.append(of.ofp_action_output(port=2)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 10 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.in_port = 2 msg.match.dl_type = 0x0806 msg.actions.append(of.ofp_action_output(port=1)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 10 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.in_port = 2 msg.match.dl_type = 0x0800 msg.actions.append(of.ofp_action_output(port=1)) event.connection.send(msg) elif event.connection.dpid == s3_dpid: msg = of.ofp_flow_mod() msg.priority = 10 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.in_port = 1 msg.match.dl_type = 0x0806 msg.actions.append(of.ofp_action_output(port=2)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 10 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.in_port = 1 msg.match.dl_type = 0x0800 msg.actions.append(of.ofp_action_output(port=2)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 10 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.in_port = 2 msg.match.dl_type = 0x0806 msg.actions.append(of.ofp_action_output(port=1)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 10 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.in_port = 2 msg.match.dl_type = 0x0800 msg.actions.append(of.ofp_action_output(port=1)) event.connection.send(msg) elif event.connection.dpid == s4_dpid: msg = of.ofp_flow_mod() msg.priority = 10 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.in_port = 1 msg.match.dl_type = 0x0806 msg.actions.append(of.ofp_action_output(port=2)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 10 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.in_port = 1 msg.match.dl_type = 0x0800 msg.actions.append(of.ofp_action_output(port=2)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 10 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.in_port = 2 msg.match.dl_type = 0x0806 msg.actions.append(of.ofp_action_output(port=1)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 10 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.in_port = 2 msg.match.dl_type = 0x0800 msg.actions.append(of.ofp_action_output(port=1)) event.connection.send(msg) elif event.connection.dpid == s5_dpid: a = packet.find('arp') if a and a.protodst == "10.0.0.4":
msg = of.ofp_packet_out(data=event.ofp) msg.actions.append(of.ofp_action_output(port=4)) event.connection.send(msg) if a and a.protodst == "10.0.0.5":
msg = of.ofp_packet_out(data=event.ofp) msg.actions.append(of.ofp_action_output(port=5)) event.connection.send(msg) if a and a.protodst == "10.0.0.6":
msg = of.ofp_packet_out(data=event.ofp) msg.actions.append(of.ofp_action_output(port=6)) event.connection.send(msg) if a and a.protodst == "10.0.0.1":
msg = of.ofp_packet_out(data=event.ofp) msg.actions.append(of.ofp_action_output(port=1)) event.connection.send(msg) if a and a.protodst == "10.0.0.2":
msg = of.ofp_packet_out(data=event.ofp) msg.actions.append(of.ofp_action_output(port=2)) event.connection.send(msg) if a and a.protodst == "10.0.0.3":
msg = of.ofp_packet_out(data=event.ofp) msg.actions.append(of.ofp_action_output(port=3)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 100 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.dl_type = 0x0800 msg.match.nw_dst = "10.0.0.1" msg.actions.append(of.ofp_action_output(port=1)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 100 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.dl_type = 0x0800 msg.match.nw_dst = "10.0.0.2" msg.actions.append(of.ofp_action_output(port=2)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 100 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.dl_type = 0x0800 msg.match.nw_dst = "10.0.0.3" msg.actions.append(of.ofp_action_output(port=3)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 100 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.dl_type = 0x0800 msg.match.nw_dst = "10.0.0.4" msg.actions.append(of.ofp_action_output(port=4)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 100 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.dl_type = 0x0800 msg.match.nw_dst = "10.0.0.5" msg.actions.append(of.ofp_action_output(port=5)) event.connection.send(msg) msg = of.ofp_flow_mod() msg.priority = 100 msg.idle_timeout = 0 msg.hard_timeout = 0 msg.match.dl_type = 0x0800 msg.match.nw_dst = "10.0.0.6" msg.actions.append(of.ofp_action_output(port=6)) event.connection.send(msg) def launch():
global start_time core.openflow.addListenerByName("PortStatsReceived", _handle_portstats_received) core.openflow.addListenerByName("ConnectionUp", _handle_ConnectionUp) core.openflow.addListenerByName("PacketIn", _handle_PacketIn)

mininet脚本

 #!/usr/bin/python

 from mininet.topo import Topo

 from mininet.net import Mininet

 from mininet.node import CPULimitedHost

 from mininet.link import TCLink

 from mininet.util import dumpNodeConnections

 from mininet.log import setLogLevel

 from mininet.node import Controller 

 from mininet.cli import CLI

 from functools import partial

 from mininet.node import RemoteController

 import os

 class MyTopo(Topo):

     "Single switch connected to n hosts."

     def __init__(self):

         Topo.__init__(self)

         s1=self.addSwitch('s1')

         s2=self.addSwitch('s2')

         s3=self.addSwitch('s3')

         s4=self.addSwitch('s4')

         s5=self.addSwitch('s5') 

         h1=self.addHost('h1')

         h2=self.addHost('h2')

         h3=self.addHost('h3')

         h4=self.addHost('h4')

         h5=self.addHost('h5')

         h6=self.addHost('h6')

         self.addLink(h1, s1, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True)

         self.addLink(h2, s1, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

         self.addLink(h3, s1, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True)

         self.addLink(s1, s2, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

         self.addLink(s1, s3, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

         self.addLink(s1, s4, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

         self.addLink(s2, s5, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

         self.addLink(s3, s5, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True)  

         self.addLink(s4, s5, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

         self.addLink(s5, h4, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

         self.addLink(s5, h5, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

         self.addLink(s5, h6, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

 def perfTest():

     "Create network and run simple performance test"

     topo = MyTopo()

     net = Mininet(topo=topo, host=CPULimitedHost, link=TCLink, controller=partial(RemoteController, ip='127.0.0.1', port=6633))

     net.start()

     print "Dumping host connections"

     dumpNodeConnections(net.hosts)

     h1,h2,h3=net.get('h1','h2','h3')

     h4,h5,h6=net.get('h4','h5','h6')

     h1.setMAC("0:0:0:0:0:1")

     h2.setMAC("0:0:0:0:0:2")

     h3.setMAC("0:0:0:0:0:3")

     h4.setMAC("0:0:0:0:0:4")

     h5.setMAC("0:0:0:0:0:5")

     h6.setMAC("0:0:0:0:0:6")

     CLI(net)

     net.stop()

 if __name__ == '__main__':

     setLogLevel('info')

     perfTest()

如果是在不同的机器使用的pox将控制器ip修改到对应pox所在的ip,我使用的是同一台计算机上的就直接修改成了127.0.0.1。


然后运行pox脚本再运行mininet脚本,得到下图:

mininet运行没啥问题,不过提示0丢包率是非法的emmmmm。 然后pox的内容有些奇怪,咋感觉少了一句的感觉。强迫症,到脚本里填上。在第260行填上一行输出。得到下图:

鉴于有人说,h1 ping不到 h4,就先pingall一下,得到下图:

一切正常。 然后继续实验,在mininet输入h1 ping -i 0.1 h4 每秒从h1传送10个包到h4。

mininet界面到时挺正常的,但是pox界面emmm一片死寂,所以我反复了几次,结果没有变化。估计不是pox出问题了,就是pox脚本写的有问题吧,难不成是我实验环境有问题?

由于对脚本内容了解的不够,所以我先尝试了一下使用poxdesk图形界面来显示结果。先安装一下。

 cd ./pox/ext
git clone https://github.com/MurphyMc/poxdesk
cd poxdesk
wget http://downloads.sourceforge.net/qooxdoo/qooxdoo-2.0.2-sdk.zip
unzip qooxdoo-2.0.2-sdk.zip
mv qooxdoo-2.0.2-sdk qx
cd poxdesk
./generate.py

我的小水管算是把我卡死了

然后通过命令运行:

 ./pox.py 脚本名 web messenger messenger.log_service messenger.ajax_transport openflow.of_service poxdesk

然后进入浏览器查看:http://pox-ip:8000/poxdesk。这里pox-ip是pox所在的ip,如果本地就直接使用127.0.0.1就行。

观察s1目标为h4的,发现output一直在5和6之间变化,但是理论来说应该有三种不同的路由规则。结果很尴尬。。。

Mininet实验 动态改变转发规则的更多相关文章

  1. mininet实验 动态改变转发规则实验

    写在前面 本实验参考 POX脚本设置好控制器的转发策略,所以只要理解脚本. mininet脚本设置好拓扑和相关信息,所以也只要理解脚本. POX脚本目前基本看不懂. 本实验我学会了:POX控制器Web ...

  2. Mininet系列实验(六):Mininet动态改变转发规则实验

    一. 实验目的 熟悉Mininet自定义拓扑脚本的编写:熟悉编写POX脚本动态改变转发规则 二.实验原理 在SDN环境中,控制器可以通过对交换机下发流表操作来控制交换机的转发行为.在本实验中,基于Mi ...

  3. SSH的本地、远程、动态端口转发实验笔记

    SSH端口转发 SSH 会自动加密和解密所有 SSH 客户端与服务端之间的网络数据.但是,SSH 还能够将其他 TCP 端口的网络数据通过 SSH 链接来转发,并且自动提供了相应的加密及解密服务.这一 ...

  4. js动态改变css伪类样式

    首先我们来看下页面上需要实现的基本效果,如下图所示: 因此我们可以使用如下js代码来试试看,是否能使用js改变伪类?如下代码所示: $(function() { $('.listnav li').cl ...

  5. jquery.validate动态更改校验规则

    有时候表单中有多个字段是相互关联的,以下遇到的就是证件类型和证件号码的关联,在下拉框中选择不同的证件类型,证件号码的值的格式都是不同的,这就需要动态的改变校验规则. 点击(此处)折叠或打开 <! ...

  6. JQuery EasyUI 动态改变表单项的验证守则

    //JQuery EasyUI 动态改变表单项的验证规则 $(document).ready(function(){ $('#FILE_QUALITY').combobox({ onChange:fu ...

  7. jquery.validate动态更改校验规则 【转】

    有时候表单中有多个字段是相互关联的,以下遇到的就是证件类型和证件号码的关联,在下拉框中选择不同的证件类型,证件号码的值的格式都是不同的,这就需要动态的改变校验规则. <!DOCTYPE html ...

  8. 哈工大 计算机网络 实验三 IPv4 分组收发实验&IPv4 分组转发实验

    计算机网络实验代码与文件可见github:计算机网络实验整理 实验名称 IPv4 分组收发实验&IPv4 分组转发实验 实验目的: (注:实验报告模板中的各项内容仅供参考,可依照实际实验情况进 ...

  9. easyui如何动态改变列的编辑属性

    动态改变列的编辑属性 var tt=$('#dg').datagrid('getColumnOption', 'yearContent'); //通过列名获得此列 tt.editor={type:'t ...

随机推荐

  1. SQL on&where&having

    on.where.having这三个都可以加条件的子句中,on是最先执行,where次之,having最后.有时候如果这先后顺序不影响中间结果的话,那最终结果是相同的.但因为on是先把不符合条件的记录 ...

  2. Java中Redis缓存

    1:安装 安装可分为单机版redis 和集群版redis  安装比较简单,自行百度即可 2:集成 pom文件中加入jedis 依赖,spring创建redis的application-resid配置, ...

  3. 【super vlan的配置】

    Super vlan的配置 一:根据项目需求搭建好拓扑图如下: 二:配置 1:由项目图进行理论分析:sw1属于三层交换,用于二层交换信息的转发;同时在sw1上可定义super vlan把sub vla ...

  4. mysql-介绍

    1.mysql几个重要的文件 每个数据库新建后,会产生数据库文件夹,在该文件夹下每张表均对应以下三个文件: xx.frm  存放表结构 xx.MYD    存放表数据 xx.MYI 存放表索引 mys ...

  5. ExceL按记录导出Txt 工具

    根据客户要求,开发此工具,每一条记录改出一个Txt文本,文本名取其中一字段数据

  6. keil5 mdk调用外部编辑器notepad++、sublime3、VSCode总结

    1.打开keil主界面,点击菜单栏Tools菜单,选择如下图所示的选项. 2.点击如下图所示的菜单上红笔标注的地方,给这个工具命名,如notepad++.sublime3.vscode等,如下图, 并 ...

  7. Python正则表达式-基础

    Python正则表达式-基础 本文转载自昔日暖阳,原文地址:http://www.osheep.cn/4806.html python使用正则,需要先引入re模块 import re 匹配符 单个字符 ...

  8. 网络基础,tpc,udp

    一 , 网络基础相关知识 1. 架构 (重点) C / S  架构 : client 客户端(APP) 和 server 服务器端 能充分发挥pc机的性能 B / S 架构 : browser 浏览器 ...

  9. Redis缓存数据库的安装与配置(2)

    1.为php安装redis客户端扩展 wget https://github.com/nicolasff/phpredis/archive/master.zip tar xf phpredis-mas ...

  10. C语言实现二分查找

    二分查找优势:比顺序查找更有效率       特点:元素按顺序排列 #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include ...