Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pcapkit/protocols/data/transport/sctp.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def __init__(self, type: 'ParameterType', length: 'int', increment: 'int') -> 'N
class HostNameAddressParameter(Parameter):
"""Data model for SCTP host name address parameter."""

#: Host name as captured, null terminator included; a parsed name may lack one.
#: Host name as captured, with any null terminator; a parsed name may lack one.
name: 'bytes'

if TYPE_CHECKING:
Expand Down
3 changes: 2 additions & 1 deletion pcapkit/protocols/schema/transport/sctp.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,8 @@ def __init__(self, type: 'Enum_Parameter', length: 'int', increment: 'int') -> '
class HostNameAddressParameter(Parameter, code=Enum_Parameter.Host_Name_Address):
"""Header schema for SCTP host name address parameter."""

#: Host name, including at least one null terminator.
#: Host name as captured. :rfc:`9260#section-3.3.2.1.4` asks for at least one
#: null terminator, but a parsed name may lack it.
name: 'bytes' = BytesField(length=lambda pkt: max(pkt['length'] - 4, 0))
#: Padding.
padding: 'bytes' = PaddingField(length=padding_length)
Expand Down
Loading