Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scapy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor 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
CodeLinaro
public-release-test-restored
platform
external
scapy
Commits
7a8d2683
Commit
7a8d2683
authored
9 years ago
by
Guillaume Valadon
Browse files
Options
Downloads
Plain Diff
Merge pull request #96 from walintonc/RA_options
Update IANA Router Alert Options
parents
9e063c06
f2568914
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scapy/layers/inet6.py
+12
-7
12 additions, 7 deletions
scapy/layers/inet6.py
with
12 additions
and
7 deletions
scapy/layers/inet6.py
+
12
−
7
View file @
7a8d2683
...
...
@@ -705,13 +705,18 @@ class PadN(Packet): # IPv6 Hop-By-Hop Option
class
RouterAlert
(
Packet
):
# RFC 2711 - IPv6 Hop-By-Hop Option
name
=
"
Router Alert
"
fields_desc
=
[
_OTypeField
(
"
otype
"
,
0x05
,
_hbhopts
),
ByteField
(
"
optlen
"
,
2
),
ShortEnumField
(
"
value
"
,
None
,
{
0
:
"
Datagram contains a MLD message
"
,
ByteField
(
"
optlen
"
,
2
),
ShortEnumField
(
"
value
"
,
None
,
{
0
:
"
Datagram contains a MLD message
"
,
1
:
"
Datagram contains RSVP message
"
,
2
:
"
Datagram contains an Active Network message
"
})
]
2
:
"
Datagram contains an Active Network message
"
,
68
:
"
NSIS NATFW NSLP
"
,
69
:
"
MPLS OAM
"
,
65535
:
"
Reserved
"
})]
# TODO : Check IANA has not defined new values for value field of RouterAlertOption
# TODO : now that we have that option, we should do something in MLD class that need it
# TODO : Now that we have that option, we should do something in MLD class that need it
# TODO : IANA has defined ranges of values which can't be easily represented here.
# iana.org/assignments/ipv6-routeralert-values/ipv6-routeralert-values.xhtml
def
alignment_delta
(
self
,
curpos
):
# alignment requirement : 2n+0
x
=
2
;
y
=
0
delta
=
x
*
((
curpos
-
y
+
x
-
1
)
/
x
)
+
y
-
curpos
...
...
@@ -1317,8 +1322,8 @@ class _ICMPv6ML(_ICMPv6):
class
ICMPv6MLQuery
(
_ICMPv6ML
):
# RFC 2710
name
=
"
MLD - Multicast Listener Query
"
type
=
130
mrd
=
10000
mladdr
=
"
::
"
# 10s for mrd
mrd
=
10000
# 10s for mrd
mladdr
=
"
::
"
overload_fields
=
{
IPv6
:
{
"
dst
"
:
"
ff02::1
"
,
"
hlim
"
:
1
,
"
nh
"
:
58
}}
def
hashret
(
self
):
if
self
.
mladdr
!=
"
::
"
:
...
...
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