Page MenuHomeFreeBSD

Add new casper socket service
Needs ReviewPublic

Authored by tig_freebsdfoundation.org on Apr 16 2020, 3:24 PM.
Referenced Files
Unknown Object (File)
Mar 13 2024, 5:29 PM
Unknown Object (File)
Dec 20 2023, 6:21 AM
Unknown Object (File)
Dec 12 2023, 7:56 PM
Unknown Object (File)
Jul 12 2023, 2:24 PM
Unknown Object (File)
Jun 30 2023, 4:31 AM
Unknown Object (File)
Jun 29 2023, 3:38 AM
Unknown Object (File)
May 23 2023, 5:01 PM
Unknown Object (File)
May 3 2023, 6:40 PM
Subscribers

Details

Reviewers
emaste
markj
Summary

Casper service to provide a connected socket

  • lets user initialize allowed destinations in cap_socket_init(). destinations are of type "socket_type:hostname:portnumber" eg. "tcp:www.google.com:80" Hostname is mandatory while socket type and port number have sentinel value to allow any. eg. "any:127.0.0.1:-1" allows any connection to localhost
  • cap_socket_connect() attempts to connect to destination provided if it's allowed. From what I've been seeing the user should pass a full destination. eg. "tcp:www.google.com:80" passing "any" or "-1" might cause socket() or connect() to fail.
Test Plan


currently tested using a simple client and server on localhost.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped