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
27a5c716
Commit
27a5c716
authored
11 years ago
by
Gregor Maier
Browse files
Options
Downloads
Patches
Plain Diff
Add OFBsnPktinSuppressionSetRequestVendorData
parent
93c22426
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/com/bigswitch/floodlight/vendor/OFBsnPktinSuppressionSetRequestVendorData.java
+124
-0
124 additions, 0 deletions
...ght/vendor/OFBsnPktinSuppressionSetRequestVendorData.java
with
124 additions
and
0 deletions
src/main/java/com/bigswitch/floodlight/vendor/OFBsnPktinSuppressionSetRequestVendorData.java
0 → 100644
+
124
−
0
View file @
27a5c716
package
com.bigswitch.floodlight.vendor
;
import
org.jboss.netty.buffer.ChannelBuffer
;
import
org.openflow.protocol.Instantiable
;
import
org.openflow.protocol.vendor.OFVendorData
;
public
class
OFBsnPktinSuppressionSetRequestVendorData
extends
OFBigSwitchVendorData
{
protected
static
Instantiable
<
OFVendorData
>
instantiableSingleton
=
new
Instantiable
<
OFVendorData
>()
{
@Override
public
OFVendorData
instantiate
()
{
return
new
OFBsnL2TableSetVendorData
();
}
};
/**
* @return a subclass of Instantiable<OFVendorData> that instantiates
* an instance of OFBsnL2TableSetVendorData.
*/
public
static
Instantiable
<
OFVendorData
>
getInstantiable
()
{
return
instantiableSingleton
;
}
public
static
final
int
BSN_PKTIN_SUPPRESSION_SET_REQUEST
=
11
;
/*
* uint8_t enabled; // 0 to disable the extension, 1 to enable it
* uint8_t pad;
* uint16_t idle_timeout; // idle_timeout for new flows
* uint16_t hard_timeout; // idle_timeout for new flows
* uint16_t priority; // priority for new flows
* uint64_t cookie; // cookie for new flows
*/
protected
boolean
suppressionEnabled
;
protected
short
idleTimeout
;
protected
short
hardTimeout
;
protected
short
priority
;
protected
long
cookie
;
public
OFBsnPktinSuppressionSetRequestVendorData
()
{
super
(
BSN_PKTIN_SUPPRESSION_SET_REQUEST
);
}
public
OFBsnPktinSuppressionSetRequestVendorData
(
boolean
suppressionEnabled
,
short
idleTimeout
,
short
hardTimeout
,
short
priority
,
long
cookie
)
{
super
(
BSN_PKTIN_SUPPRESSION_SET_REQUEST
);
this
.
suppressionEnabled
=
suppressionEnabled
;
this
.
idleTimeout
=
idleTimeout
;
this
.
hardTimeout
=
hardTimeout
;
this
.
priority
=
priority
;
this
.
cookie
=
cookie
;
}
public
boolean
isSuppressionEnabled
()
{
return
suppressionEnabled
;
}
public
short
getIdleTimeout
()
{
return
idleTimeout
;
}
public
short
getHardTimeout
()
{
return
hardTimeout
;
}
public
short
getPriority
()
{
return
priority
;
}
public
long
getCookie
()
{
return
cookie
;
}
public
void
setSuppressionEnabled
(
boolean
suppressionEnabled
)
{
this
.
suppressionEnabled
=
suppressionEnabled
;
}
public
void
setIdleTimeout
(
short
idleTimeout
)
{
this
.
idleTimeout
=
idleTimeout
;
}
public
void
setHardTimeout
(
short
hardTimeout
)
{
this
.
hardTimeout
=
hardTimeout
;
}
public
void
setPriority
(
short
priority
)
{
this
.
priority
=
priority
;
}
public
void
setCookie
(
long
cookie
)
{
this
.
cookie
=
cookie
;
}
@Override
public
int
getLength
()
{
return
super
.
getLength
()
+
16
;
}
@Override
public
void
readFrom
(
ChannelBuffer
data
,
int
length
)
{
super
.
readFrom
(
data
,
length
);
suppressionEnabled
=
(
data
.
readByte
()
!=
0
);
data
.
readByte
();
idleTimeout
=
data
.
readShort
();
hardTimeout
=
data
.
readShort
();
priority
=
data
.
readShort
();
cookie
=
data
.
readLong
();
}
@Override
public
void
writeTo
(
ChannelBuffer
data
)
{
super
.
writeTo
(
data
);
data
.
writeByte
(
suppressionEnabled
?
1
:
0
);
data
.
writeByte
(
0
);
// pad
data
.
writeShort
(
idleTimeout
);
data
.
writeShort
(
hardTimeout
);
data
.
writeShort
(
priority
);
data
.
writeLong
(
cookie
);
}
}
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