Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some commands in Chapter 7.4 #4107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

benquike
Copy link
Contributor

Checklist:

  • If you are new to Scapy: I have checked CONTRIBUTING.md (esp. section submitting-pull-requests)
  • I squashed commits belonging together
  • I added unit tests or explained why they are not relevant
  • I executed the regression tests (using cd test && ./run_tests or tox)
  • If the PR is still not finished, please create a Draft Pull Request

fixes #xxx

@codecov
Copy link

codecov bot commented Aug 31, 2023

Codecov Report

Merging #4107 (cc51514) into master (3e69007) will increase coverage by 0.38%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4107      +/-   ##
==========================================
+ Coverage   81.59%   81.97%   +0.38%     
==========================================
  Files         328      328              
  Lines       75949    75958       +9     
==========================================
+ Hits        61968    62264     +296     
+ Misses      13981    13694     -287     
Files Changed Coverage Δ
scapy/layers/bluetooth.py 87.23% <100.00%> (+0.14%) ⬆️

... and 14 files with indirect coverage changes

@gpotter2
Copy link
Member

Thanks for the PR ! Could you add one (or more) unit tests? Thanks

@antoniovazquezblanco
Copy link
Contributor

Should this PR include some layer binding?

7.4.1 Read Local Version Information command

"""
name = "HCI_Read_Local_Version_Information"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This packets don't have a field_desc. Why are they useful for you?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because they set an opcode or ogf and ocf in the parent packet.

They are part of the Bluetooth specification and have a function.

@@ -1038,9 +1038,52 @@ class HCI_Cmd_Write_LE_Host_Support(Packet):


# 7.4 INFORMATIONAL PARAMETERS, the OGF is defined as 0x04
class HCI_Cmd_Read_Local_Version_Information(Packet):
"""

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In previous PRs the class docstring was added but without newlines. Should the empty lines be removed?

@@ -1038,9 +1038,52 @@ class HCI_Cmd_Write_LE_Host_Support(Packet):


# 7.4 INFORMATIONAL PARAMETERS, the OGF is defined as 0x04
class HCI_Cmd_Read_Local_Version_Information(Packet):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This packet is missing the corresponding binding.

name = "HCI_Read_Local_Version_Information"


class HCI_Cmd_Read_Local_Supported_Commands(Packet):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This packet is missing the corresponding binding.

name = "HCI_Read_Local_Supported_Commands"


class HCI_Cmd_Read_Local_Supported_Features(Packet):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This packet is missing the corresponding binding.

name = "HCI_Read_Local_Supported_Features"


class HCI_Cmd_Read_Local_Extended_Features(Packet):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This packet is missing the corresponding binding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants