Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bio-rd
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
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
danet
bio-rd
Commits
e272abf5
Commit
e272abf5
authored
5 years ago
by
Marcus Weiner
Browse files
Options
Downloads
Patches
Plain Diff
Provide helpers for router options
parent
1c696c88
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2
Packet/ospfv3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
protocols/ospf/packetv3/common.go
+16
-0
16 additions, 0 deletions
protocols/ospf/packetv3/common.go
with
16 additions
and
0 deletions
protocols/ospf/packetv3/common.go
+
16
−
0
View file @
e272abf5
...
...
@@ -48,6 +48,22 @@ type RouterOptions struct {
Flags
uint16
}
func
OptionsFromFlags
(
flags
...
uint16
)
RouterOptions
{
opts
:=
RouterOptions
{
Flags
:
0
}
for
_
,
flag
:=
range
flags
{
opts
.
Flags
=
opts
.
Flags
|
flag
}
return
opts
}
func
(
r
*
RouterOptions
)
HasFlag
(
flag
uint16
)
bool
{
return
r
.
Flags
&
flag
!=
0
}
func
(
r
*
RouterOptions
)
SetFlag
(
flag
uint16
)
{
r
.
Flags
=
r
.
Flags
|
flag
}
func
(
r
*
RouterOptions
)
Serialize
(
buf
*
bytes
.
Buffer
)
{
buf
.
WriteByte
(
0
)
buf
.
Write
(
convert
.
Uint16Byte
(
uint16
(
r
.
Flags
)))
...
...
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