Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
alshabib
2014-09-12 18:17:37 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e7031568ef98da31b71b8f6c0159f59a6583b26e
e7031568
1 parent
c114d3d0
renamed OF packet context to OpenFlowPacketContext
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
10 deletions
core/api/src/main/java/org/onlab/onos/net/packet/PacketProcessor.java
of/api/src/main/java/org/onlab/onos/of/controller/DefaultPacketContext.java → of/api/src/main/java/org/onlab/onos/of/controller/DefaultOpenFlowPacketContext.java
of/api/src/main/java/org/onlab/onos/of/controller/PacketContext.java → of/api/src/main/java/org/onlab/onos/of/controller/OpenFlowPacketContext.java
of/api/src/main/java/org/onlab/onos/of/controller/PacketListener.java
of/ctl/src/main/java/org/onlab/onos/of/controller/impl/OpenFlowControllerImpl.java
providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/OpenFlowLinkProvider.java
core/api/src/main/java/org/onlab/onos/net/packet/PacketProcessor.java
View file @
e703156
package
org
.
onlab
.
onos
.
net
.
packet
;
/**
* Abstraction of an inbound packet processor.
*/
...
...
of/api/src/main/java/org/onlab/onos/of/controller/DefaultPacketContext.java
→
of/api/src/main/java/org/onlab/onos/of/controller/Default
OpenFlow
PacketContext.java
View file @
e703156
...
...
@@ -11,7 +11,7 @@ import org.projectfloodlight.openflow.protocol.match.MatchField;
import
org.projectfloodlight.openflow.types.OFBufferId
;
import
org.projectfloodlight.openflow.types.OFPort
;
public
final
class
Default
PacketContext
implements
PacketContext
{
public
final
class
Default
OpenFlowPacketContext
implements
OpenFlow
PacketContext
{
private
boolean
free
=
true
;
private
boolean
isBuilt
=
false
;
...
...
@@ -19,7 +19,7 @@ public final class DefaultPacketContext implements PacketContext {
private
final
OFPacketIn
pktin
;
private
OFPacketOut
pktout
=
null
;
private
DefaultPacketContext
(
OpenFlowSwitch
s
,
OFPacketIn
pkt
)
{
private
Default
OpenFlow
PacketContext
(
OpenFlowSwitch
s
,
OFPacketIn
pkt
)
{
this
.
sw
=
s
;
this
.
pktin
=
pkt
;
}
...
...
@@ -78,8 +78,8 @@ public final class DefaultPacketContext implements PacketContext {
return
new
Dpid
(
sw
.
getId
());
}
public
static
PacketContext
packetContextFromPacketIn
(
OpenFlowSwitch
s
,
OFPacketIn
pkt
)
{
return
new
DefaultPacketContext
(
s
,
pkt
);
public
static
OpenFlow
PacketContext
packetContextFromPacketIn
(
OpenFlowSwitch
s
,
OFPacketIn
pkt
)
{
return
new
Default
OpenFlow
PacketContext
(
s
,
pkt
);
}
@Override
...
...
of/api/src/main/java/org/onlab/onos/of/controller/PacketContext.java
→
of/api/src/main/java/org/onlab/onos/of/controller/
OpenFlow
PacketContext.java
View file @
e703156
...
...
@@ -8,7 +8,7 @@ import org.projectfloodlight.openflow.types.OFPort;
* to view the packet in event but may block the response to the
* event if blocked has been called.
*/
public
interface
PacketContext
{
public
interface
OpenFlow
PacketContext
{
//TODO: may want to support sending packet out other switches than
// the one it came in on.
...
...
of/api/src/main/java/org/onlab/onos/of/controller/PacketListener.java
View file @
e703156
...
...
@@ -10,5 +10,5 @@ public interface PacketListener {
*
* @param pktCtx the packet context
*/
public
void
handlePacket
(
PacketContext
pktCtx
);
public
void
handlePacket
(
OpenFlow
PacketContext
pktCtx
);
}
...
...
of/ctl/src/main/java/org/onlab/onos/of/controller/impl/OpenFlowControllerImpl.java
View file @
e703156
...
...
@@ -12,7 +12,7 @@ import org.apache.felix.scr.annotations.Activate;
import
org.apache.felix.scr.annotations.Component
;
import
org.apache.felix.scr.annotations.Deactivate
;
import
org.apache.felix.scr.annotations.Service
;
import
org.onlab.onos.of.controller.DefaultPacketContext
;
import
org.onlab.onos.of.controller.Default
OpenFlow
PacketContext
;
import
org.onlab.onos.of.controller.Dpid
;
import
org.onlab.onos.of.controller.OpenFlowController
;
import
org.onlab.onos.of.controller.OpenFlowSwitch
;
...
...
@@ -124,7 +124,7 @@ public class OpenFlowControllerImpl implements OpenFlowController {
break
;
case
PACKET_IN:
for
(
PacketListener
p
:
ofPacketListener
)
{
p
.
handlePacket
(
DefaultPacketContext
p
.
handlePacket
(
Default
OpenFlow
PacketContext
.
packetContextFromPacketIn
(
this
.
getSwitch
(
dpid
),
(
OFPacketIn
)
msg
));
}
...
...
providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/OpenFlowLinkProvider.java
View file @
e703156
...
...
@@ -15,7 +15,7 @@ import org.onlab.onos.of.controller.Dpid;
import
org.onlab.onos.of.controller.OpenFlowController
;
import
org.onlab.onos.of.controller.OpenFlowSwitch
;
import
org.onlab.onos.of.controller.OpenFlowSwitchListener
;
import
org.onlab.onos.of.controller.PacketContext
;
import
org.onlab.onos.of.controller.
OpenFlow
PacketContext
;
import
org.onlab.onos.of.controller.PacketListener
;
import
org.projectfloodlight.openflow.protocol.OFPortConfig
;
import
org.projectfloodlight.openflow.protocol.OFPortDesc
;
...
...
@@ -87,7 +87,7 @@ public class OpenFlowLinkProvider extends AbstractProvider implements LinkProvid
@Override
public
void
handlePacket
(
PacketContext
pktCtx
)
{
public
void
handlePacket
(
OpenFlow
PacketContext
pktCtx
)
{
LinkDiscovery
ld
=
discoverers
.
get
(
pktCtx
.
dpid
());
if
(
ld
==
null
)
{
return
;
...
...
Please
register
or
login
to post a comment