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 bytes_to_mac_address function to runtime library #1874

Closed
mbispham opened this issue Sep 26, 2024 · 0 comments · Fixed by #1876
Closed

Add bytes_to_mac_address function to runtime library #1874

mbispham opened this issue Sep 26, 2024 · 0 comments · Fixed by #1876
Assignees
Labels
Enhancement Improvement of existing functionality Feature Request Request for new functionality Good first issue Good for newcomers Runtime Library Issues related to the HILTI or Spicy runtime libraries

Comments

@mbispham
Copy link

Requesting an enhancement by adding a new function bytes_to_mac_address - in the runtime library - to convert byte sequences to MAC address strings.

Link to Slack conversation

Cisco do display MAC addresses differently but aside for them (AFAIK) the default way of viewing them is Colon-separated: "XX:XX:XX:XX:XX:XX".

@rsmmr rsmmr added Enhancement Improvement of existing functionality Good first issue Good for newcomers Feature Request Request for new functionality Runtime Library Issues related to the HILTI or Spicy runtime libraries labels Sep 26, 2024
@rsmmr rsmmr self-assigned this Sep 27, 2024
rsmmr added a commit that referenced this issue Sep 27, 2024
```
## Returns a bytes value rendered as a MAC address string (i.e., colon-separated hex bytes).
public function bytes_to_mac(value: bytes) : string;
```

Closes #1874.
rsmmr added a commit that referenced this issue Sep 27, 2024
```
## Returns a bytes value rendered as a MAC address string (i.e., colon-separated hex bytes).
public function bytes_to_mac(value: bytes) : string;
```

Closes #1874.
rsmmr added a commit that referenced this issue Sep 27, 2024
```
## Returns a bytes value rendered as a MAC address string (i.e., colon-separated hex bytes).
public function bytes_to_mac(value: bytes) : string;
```

Closes #1874.
@rsmmr rsmmr closed this as completed in ee53b9f Sep 30, 2024
rsmmr added a commit that referenced this issue Sep 30, 2024
* origin/topic/robin/gh-1874-bytes-to-mac:
  Optimize `spicy::bytes_to_hexstring` and `spicy::bytes_to_mac`.
  Add new library function `spicy::bytes_to_mac`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement of existing functionality Feature Request Request for new functionality Good first issue Good for newcomers Runtime Library Issues related to the HILTI or Spicy runtime libraries
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants