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

Consider populating the "name" field of datagram socket entries #1224

Open
jphickey opened this issue Feb 23, 2022 · 0 comments
Open

Consider populating the "name" field of datagram socket entries #1224

jphickey opened this issue Feb 23, 2022 · 0 comments

Comments

@jphickey
Copy link
Contributor

Is your feature request related to a problem? Please describe.
As noticed in previous issue #1222, the datagram sockets are essentially name-less. This means that the name_entry field of these entries is left unset, and will be NULL.

This is different than most other OSAL resource types, which all have names.

Describe the solution you'd like
Stream sockets (IIRC) generate a name consisting of the local IP address/port and remote IP address/port. Datagram sockets are connectionless, but theoretically this field could still be populated with something unique, such that name-based APIs could work.

Describe alternatives you've considered
Leave as-is, where datagram sockets remain anonymous/nameless.

Additional context
Most name-based OSAL APIs (such as OS_CloseFileByName) intentionally only operate on files - they check if the entry is a socket and ignore it if it is, so having a name associated with sockets if of limited usefulness unless we open that up, which also may not be a bad idea. (i.e. one can get the name by calling OS_FDGetInfo, then pass that name to OS_CloseFileByName or OS_FileOpenCheck, etc).

Requester Info
Joseph Hickey, Vantage Systems, Inc.
Based on CCB discussion of #1223 on 2022-02-23

jphickey added a commit to jphickey/osal that referenced this issue Aug 10, 2022
This also fixes up/simplifies some include directives in UT headers

Additionally this updates UT_ResetState() in ut_support to always
configure the AppId for CFE_ES_GetAppId.  Unfortunately some TBL test
cases require/assume the "real" app IDs.  This works around the issue
and allows TBL tests to pass.  (This is really a weakness/fragility in
TBL tests).
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant