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

POSIX, sockets: Elaborate ioctl/fcntl handling #12002

Merged
merged 6 commits into from
Dec 14, 2018

Commits on Dec 12, 2018

  1. samples: sockets: echo_async: Check results of fcntl() calls

    Check result of fcntl() to catch any regressions in fcntl() handling
    in Zephyr. To facilitate this, also merge block() and nonblock()
    functions into single setblocking().
    
    Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
    pfalcon committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    25472b6 View commit details
    Browse the repository at this point in the history
  2. net: sockets: Rework fcntl() dispatching to the underlying fd object

    fcntl operations are implemented using ioctl vmethod.
    
    Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
    pfalcon committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    3b9e072 View commit details
    Browse the repository at this point in the history
  3. tests: posix: test_fs_file: Add testcase with non-zero lseek()

    Check that skipping a few initial bytes of file gives the expected
    result.
    
    Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
    pfalcon committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    c3e89ef View commit details
    Browse the repository at this point in the history
  4. lib: fdtable: Change ioctl vmethod signature to take va_list

    As extend fdtable usage to more cases, there regularly arises a need
    to forward ioctl/fcntl arguments to another ioctl vmethod, which is
    complicated because it defined as taking variadic arguments. The only
    portable solution is to convert variadic arguments to va_list at the
    first point of entry from client code, and then pass va_list around.
    
    To facilitate calling ioctl with variadic arguments from system code,
    z_fdtable_call_ioctl() helper function is added.
    
    Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
    pfalcon committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    9512a02 View commit details
    Browse the repository at this point in the history
  5. lib/fdtable: Add ioctl() and fcntl() implementations

    ioctl() just dispatches to the corresponding vmethod of an fd.
    fcntl() handles fdtable-level operations (so far doesn't handle
    actually, returning "not implemented" error), and forwards
    fd-specific operations to ioctl vmethod just the same (i.e.
    ioctl and fcntl operations share the same namespace, but otherwise
    disjoint).
    
    Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
    pfalcon committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    05ec9d5 View commit details
    Browse the repository at this point in the history
  6. net: sockets_tls: Typo fix in comment

    s/DLTS/DTLS.
    
    Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
    pfalcon committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    64d9479 View commit details
    Browse the repository at this point in the history