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 16:25:21 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f6d77960dd6b9811c95ec603f0ce10020a0cca88
f6d77960
1 parent
4009d2c5
default packet context
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
core/api/src/main/java/org/onlab/onos/net/packet/DefaultPacketContext.java
core/api/src/main/java/org/onlab/onos/net/packet/DefaultPacketContext.java
0 → 100644
View file @
f6d7796
package
org
.
onlab
.
onos
.
net
.
packet
;
public
abstract
class
DefaultPacketContext
implements
PacketContext
{
private
final
long
time
;
private
final
InboundPacket
inPkt
;
private
final
OutboundPacket
outPkt
;
private
boolean
block
=
false
;
protected
DefaultPacketContext
(
long
time
,
InboundPacket
inPkt
,
OutboundPacket
outPkt
,
boolean
block
)
{
super
();
this
.
time
=
time
;
this
.
inPkt
=
inPkt
;
this
.
outPkt
=
outPkt
;
this
.
block
=
block
;
}
@Override
public
long
time
()
{
return
time
;
}
@Override
public
InboundPacket
inPacket
()
{
return
inPkt
;
}
@Override
public
OutboundPacket
outPacket
()
{
return
outPkt
;
}
@Override
public
abstract
void
send
();
@Override
public
void
block
()
{
this
.
block
=
true
;
}
@Override
public
boolean
isHandled
()
{
return
this
.
block
;
}
}
Please
register
or
login
to post a comment