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
f2568914
Commit
f2568914
authored
9 years ago
by
Walinton Cambronero
Browse files
Options
Downloads
Patches
Plain Diff
Update IANA Router Alert Options
Signed-off-by:
Walinton Cambronero
<
walinton.cambronero@hpe.com
>
parent
9434f75b
No related branches found
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 @
f2568914
...
@@ -705,13 +705,18 @@ class PadN(Packet): # IPv6 Hop-By-Hop Option
...
@@ -705,13 +705,18 @@ class PadN(Packet): # IPv6 Hop-By-Hop Option
class
RouterAlert
(
Packet
):
# RFC 2711 - IPv6 Hop-By-Hop Option
class
RouterAlert
(
Packet
):
# RFC 2711 - IPv6 Hop-By-Hop Option
name
=
"
Router Alert
"
name
=
"
Router Alert
"
fields_desc
=
[
_OTypeField
(
"
otype
"
,
0x05
,
_hbhopts
),
fields_desc
=
[
_OTypeField
(
"
otype
"
,
0x05
,
_hbhopts
),
ByteField
(
"
optlen
"
,
2
),
ByteField
(
"
optlen
"
,
2
),
ShortEnumField
(
"
value
"
,
None
,
ShortEnumField
(
"
value
"
,
None
,
{
0
:
"
Datagram contains a MLD message
"
,
{
0
:
"
Datagram contains a MLD message
"
,
1
:
"
Datagram contains RSVP 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 : 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
def
alignment_delta
(
self
,
curpos
):
# alignment requirement : 2n+0
x
=
2
;
y
=
0
x
=
2
;
y
=
0
delta
=
x
*
((
curpos
-
y
+
x
-
1
)
/
x
)
+
y
-
curpos
delta
=
x
*
((
curpos
-
y
+
x
-
1
)
/
x
)
+
y
-
curpos
...
@@ -1317,8 +1322,8 @@ class _ICMPv6ML(_ICMPv6):
...
@@ -1317,8 +1322,8 @@ class _ICMPv6ML(_ICMPv6):
class
ICMPv6MLQuery
(
_ICMPv6ML
):
# RFC 2710
class
ICMPv6MLQuery
(
_ICMPv6ML
):
# RFC 2710
name
=
"
MLD - Multicast Listener Query
"
name
=
"
MLD - Multicast Listener Query
"
type
=
130
type
=
130
mrd
=
10000
mrd
=
10000
# 10s for mrd
mladdr
=
"
::
"
# 10s for mrd
mladdr
=
"
::
"
overload_fields
=
{
IPv6
:
{
"
dst
"
:
"
ff02::1
"
,
"
hlim
"
:
1
,
"
nh
"
:
58
}}
overload_fields
=
{
IPv6
:
{
"
dst
"
:
"
ff02::1
"
,
"
hlim
"
:
1
,
"
nh
"
:
58
}}
def
hashret
(
self
):
def
hashret
(
self
):
if
self
.
mladdr
!=
"
::
"
:
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