selftests/bpf: Add send_to_fd_opts helper

Similar to network helpers connect_to_addr() and connect_to_fd_opts(), this
patch adds two helpers send_to_addr() send_to_fd_opts() to use sendto()
to send data. They accepts three more parameters "const void *data",
"size_t datalen" and "int flags" for the sending data. send_to_addr() is a
static function at this moment, only send_to_fd_opts() is exported.

The first user of send_to_fd_opts() is fastopen_connect() in
network_helpers.c.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
2 files changed