On Tue, Jun 13, 2017 at 10:13:23PM +0800, JingPiao Chen wrote:
> * tests/netlink_sock_diag.c: Include <arpa/inet.h>
> and <linux/inet_diag.h>.
> (test_inet_diag_req, test_inet_diag_req_v2)
> (test_inet_diag_msg): New functions.
> (mian): Use them.
> 
> Co-authored-by: Fabien Siron <fabien.si...@epita.fr>
> ---
>  tests/netlink_sock_diag.c | 397 
> ++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 397 insertions(+)
> 
> diff --git a/tests/netlink_sock_diag.c b/tests/netlink_sock_diag.c
> index 17fd5f4..8171e2e 100644
> --- a/tests/netlink_sock_diag.c
> +++ b/tests/netlink_sock_diag.c
> @@ -33,8 +33,10 @@
>  #include <stdint.h>
>  #include <unistd.h>
>  #include <sys/socket.h>
> +#include <arpa/inet.h>
>  #include <netinet/tcp.h>
>  #include <linux/if_ether.h>
> +#include <linux/inet_diag.h>
>  #include <linux/netlink.h>
>  #include <linux/netlink_diag.h>
>  #include <linux/packet_diag.h>
> @@ -792,6 +794,398 @@ test_packet_diag_msg(const int fd)
>              sprintrc(rc));
>  }
>  
> +static void
> +test_inet_diag_req(const int fd)
> +{
> +     const char address[] = "8.8.8.8";

Let's use something more sophisticated than this magic address.
Let's use different addresses in different tests.


-- 
ldv

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to