Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
floodlight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
croft1
floodlight
Commits
123aa435
Commit
123aa435
authored
9 years ago
by
AndreMantas
Browse files
Options
Downloads
Patches
Plain Diff
Update LearningSwitch.java
writePacketOutForPacketIn now calls OFMessageUtils.writePacketOutForPacketIn
parent
1733c468
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/net/floodlightcontroller/learningswitch/LearningSwitch.java
+1
-20
1 addition, 20 deletions
...t/floodlightcontroller/learningswitch/LearningSwitch.java
with
1 addition
and
20 deletions
src/main/java/net/floodlightcontroller/learningswitch/LearningSwitch.java
+
1
−
20
View file @
123aa435
...
...
@@ -354,27 +354,8 @@ implements IFloodlightModule, ILearningSwitchService, IOFMessageListener {
* @param egressPort The switchport to output the PacketOut.
*/
private
void
writePacketOutForPacketIn
(
IOFSwitch
sw
,
OFPacketIn
packetInMessage
,
OFPort
egressPort
)
{
OFPacketOut
.
Builder
pob
=
sw
.
getOFFactory
().
buildPacketOut
();
// Set buffer_id, in_port, actions_len
pob
.
setBufferId
(
packetInMessage
.
getBufferId
());
pob
.
setInPort
(
packetInMessage
.
getVersion
().
compareTo
(
OFVersion
.
OF_12
)
<
0
?
packetInMessage
.
getInPort
()
:
packetInMessage
.
getMatch
().
get
(
MatchField
.
IN_PORT
));
// set actions
List
<
OFAction
>
actions
=
new
ArrayList
<
OFAction
>(
1
);
actions
.
add
(
sw
.
getOFFactory
().
actions
().
buildOutput
().
setPort
(
egressPort
).
setMaxLen
(
0xffFFffFF
).
build
());
pob
.
setActions
(
actions
);
// set data - only if buffer_id == -1
if
(
packetInMessage
.
getBufferId
()
==
OFBufferId
.
NO_BUFFER
)
{
byte
[]
packetData
=
packetInMessage
.
getData
();
pob
.
setData
(
packetData
);
}
// and write it out
OFMessageUtils
.
writePacketOutForPacketIn
(
sw
,
packetInMessage
,
egressPort
);
counterPacketOut
.
increment
();
sw
.
write
(
pob
.
build
());
}
protected
Match
createMatchFromPacket
(
IOFSwitch
sw
,
OFPort
inPort
,
FloodlightContext
cntx
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment