Home | History | Annotate | Line # | Download | only in icmp
t_ping.c revision 1.6
      1  1.6  pooka /*	$NetBSD: t_ping.c,v 1.6 2010/08/18 21:23:48 pooka Exp $	*/
      2  1.1  pooka 
      3  1.1  pooka /*-
      4  1.1  pooka  * Copyright (c) 2010 The NetBSD Foundation, Inc.
      5  1.1  pooka  * All rights reserved.
      6  1.1  pooka  *
      7  1.1  pooka  * Redistribution and use in source and binary forms, with or without
      8  1.1  pooka  * modification, are permitted provided that the following conditions
      9  1.1  pooka  * are met:
     10  1.1  pooka  * 1. Redistributions of source code must retain the above copyright
     11  1.1  pooka  *    notice, this list of conditions and the following disclaimer.
     12  1.1  pooka  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1  pooka  *    notice, this list of conditions and the following disclaimer in the
     14  1.1  pooka  *    documentation and/or other materials provided with the distribution.
     15  1.1  pooka  *
     16  1.1  pooka  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
     17  1.1  pooka  * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
     18  1.1  pooka  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     19  1.1  pooka  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     20  1.1  pooka  * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
     21  1.1  pooka  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     22  1.1  pooka  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
     23  1.1  pooka  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     24  1.1  pooka  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
     25  1.1  pooka  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     26  1.1  pooka  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
     27  1.1  pooka  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     28  1.1  pooka  */
     29  1.1  pooka 
     30  1.1  pooka #include <sys/cdefs.h>
     31  1.1  pooka #ifndef lint
     32  1.6  pooka __RCSID("$NetBSD: t_ping.c,v 1.6 2010/08/18 21:23:48 pooka Exp $");
     33  1.1  pooka #endif /* not lint */
     34  1.1  pooka 
     35  1.1  pooka #include <sys/types.h>
     36  1.2  pooka #include <sys/resource.h>
     37  1.5  pooka #include <sys/sysctl.h>
     38  1.5  pooka #include <sys/wait.h>
     39  1.1  pooka 
     40  1.1  pooka #include <atf-c.h>
     41  1.5  pooka #include <assert.h>
     42  1.2  pooka #include <fcntl.h>
     43  1.1  pooka #include <stdio.h>
     44  1.1  pooka #include <stdlib.h>
     45  1.1  pooka #include <string.h>
     46  1.1  pooka #include <unistd.h>
     47  1.1  pooka 
     48  1.5  pooka #include <netinet/in.h>
     49  1.5  pooka #include <netinet/ip_var.h>
     50  1.5  pooka 
     51  1.1  pooka #include <rump/rump.h>
     52  1.5  pooka #include <rump/rump_syscalls.h>
     53  1.1  pooka 
     54  1.1  pooka #include "../../h_macros.h"
     55  1.1  pooka #include "../config/netconfig.c"
     56  1.1  pooka 
     57  1.1  pooka ATF_TC(simpleping);
     58  1.1  pooka ATF_TC_HEAD(simpleping, tc)
     59  1.1  pooka {
     60  1.1  pooka 
     61  1.1  pooka 	atf_tc_set_md_var(tc, "descr", "check that kernel responds to ping");
     62  1.1  pooka 	atf_tc_set_md_var(tc, "use.fs", "true");
     63  1.1  pooka 	atf_tc_set_md_var(tc, "timeout", "2");
     64  1.1  pooka }
     65  1.1  pooka 
     66  1.1  pooka ATF_TC_BODY(simpleping, tc)
     67  1.1  pooka {
     68  1.1  pooka 	char ifname[IFNAMSIZ];
     69  1.1  pooka 	pid_t cpid;
     70  1.1  pooka 	bool win, win2;
     71  1.1  pooka 
     72  1.1  pooka 	cpid = fork();
     73  1.1  pooka 	rump_init();
     74  1.1  pooka 	netcfg_rump_makeshmif("but-can-i-buy-your-ether-bus", ifname);
     75  1.1  pooka 
     76  1.1  pooka 	switch (cpid) {
     77  1.1  pooka 	case -1:
     78  1.1  pooka 		atf_tc_fail_errno("fork failed");
     79  1.1  pooka 	case 0:
     80  1.1  pooka 		netcfg_rump_if(ifname, "1.1.1.10", "255.255.255.0");
     81  1.1  pooka 		pause();
     82  1.1  pooka 		break;
     83  1.1  pooka 	default:
     84  1.1  pooka 		break;
     85  1.1  pooka 	}
     86  1.1  pooka 
     87  1.1  pooka 	netcfg_rump_if(ifname, "1.1.1.20", "255.255.255.0");
     88  1.1  pooka 
     89  1.1  pooka 	/*
     90  1.1  pooka 	 * The beauty of shmif is that we don't have races here.
     91  1.1  pooka 	 */
     92  1.1  pooka 	win = netcfg_rump_pingtest("1.1.1.10", 500);
     93  1.1  pooka 	win2 = netcfg_rump_pingtest("1.1.1.30", 500);
     94  1.1  pooka 
     95  1.1  pooka 	kill(cpid, SIGKILL);
     96  1.1  pooka 
     97  1.1  pooka 	if (!win)
     98  1.1  pooka 		atf_tc_fail("ping failed");
     99  1.1  pooka 	if (win2)
    100  1.1  pooka 		atf_tc_fail("non-existent host responded");
    101  1.1  pooka }
    102  1.1  pooka 
    103  1.2  pooka ATF_TC(floodping);
    104  1.2  pooka ATF_TC_HEAD(floodping, tc)
    105  1.2  pooka {
    106  1.2  pooka 
    107  1.2  pooka 	atf_tc_set_md_var(tc, "descr", "see how kernel responds to floodping");
    108  1.2  pooka 	atf_tc_set_md_var(tc, "use.fs", "true");
    109  1.2  pooka }
    110  1.2  pooka 
    111  1.3  pooka /* why the hell isn't this available in userspace??? */
    112  1.3  pooka static uint16_t
    113  1.3  pooka in_cksum(void *data, size_t len)
    114  1.3  pooka {
    115  1.3  pooka 	uint16_t *buf = data;
    116  1.3  pooka 	unsigned sum;
    117  1.3  pooka 
    118  1.3  pooka 	for (sum = 0; len > 1; len -= 2)
    119  1.3  pooka 		sum += *buf++;
    120  1.3  pooka 	if (len)
    121  1.3  pooka 		sum += *(uint8_t *)buf;
    122  1.3  pooka 
    123  1.3  pooka 	sum = (sum >> 16) + (sum & 0xffff);
    124  1.3  pooka 	sum += (sum >> 16);
    125  1.3  pooka 
    126  1.3  pooka 	return ~sum;
    127  1.3  pooka }
    128  1.3  pooka 
    129  1.3  pooka static int
    130  1.3  pooka doping(const char *target, int loops, size_t pktsize)
    131  1.2  pooka {
    132  1.3  pooka 	char sndbuf[IP_MAXPACKET - sizeof(struct ip)];
    133  1.3  pooka 	char recvbuf[IP_MAXPACKET];
    134  1.2  pooka 	struct sockaddr_in dst, pingee;
    135  1.3  pooka 	struct icmp *icmp;
    136  1.2  pooka 	socklen_t slen;
    137  1.2  pooka 	ssize_t n;
    138  1.3  pooka 	int loop, i, succ;
    139  1.2  pooka 	int x, xnon, s;
    140  1.2  pooka 
    141  1.3  pooka 	RL(s = rump_sys_socket(PF_INET, SOCK_RAW, IPPROTO_ICMP));
    142  1.3  pooka 	RL(x = rump_sys_fcntl(s, F_GETFL, 0));
    143  1.3  pooka 	xnon = x | O_NONBLOCK;
    144  1.3  pooka 
    145  1.3  pooka 	memset(&dst, 0, sizeof(dst));
    146  1.3  pooka 	dst.sin_len = sizeof(dst);
    147  1.3  pooka 	dst.sin_family = AF_INET;
    148  1.3  pooka 	dst.sin_addr.s_addr = inet_addr(target);
    149  1.3  pooka 
    150  1.3  pooka 	icmp = (struct icmp *)sndbuf;
    151  1.3  pooka 	memset(icmp, 0, sizeof(*icmp));
    152  1.3  pooka 	icmp->icmp_type = ICMP_ECHO;
    153  1.3  pooka 	icmp->icmp_id = htons(37);
    154  1.3  pooka 
    155  1.3  pooka 	if (pktsize < sizeof(*icmp))
    156  1.3  pooka 		pktsize = sizeof(*icmp);
    157  1.3  pooka 	if (pktsize > sizeof(sndbuf))
    158  1.3  pooka 		pktsize = sizeof(sndbuf);
    159  1.3  pooka 
    160  1.3  pooka 	RL(rump_sys_setsockopt(s, SOL_SOCKET, SO_SNDBUF,
    161  1.3  pooka 	    &pktsize, sizeof(pktsize)));
    162  1.3  pooka 	RL(rump_sys_setsockopt(s, SOL_SOCKET, SO_RCVBUF,
    163  1.3  pooka 	    &pktsize, sizeof(pktsize)));
    164  1.3  pooka 
    165  1.3  pooka 	slen = sizeof(pingee);
    166  1.3  pooka 	succ = 0;
    167  1.3  pooka 	for (loop = 0; loop < loops; loop++) {
    168  1.3  pooka 		RL(rump_sys_fcntl(s, F_SETFL, x));
    169  1.3  pooka 		icmp->icmp_seq = htons(loop);
    170  1.3  pooka 		icmp->icmp_cksum = 0;
    171  1.3  pooka 		icmp->icmp_cksum = in_cksum(icmp, pktsize);
    172  1.3  pooka 		RL(rump_sys_sendto(s, icmp, pktsize, 0,
    173  1.3  pooka 		    (struct sockaddr *)&dst, sizeof(dst)));
    174  1.3  pooka 
    175  1.3  pooka 		RL(rump_sys_fcntl(s, F_SETFL, xnon));
    176  1.3  pooka 		while ((n = rump_sys_recvfrom(s, recvbuf, sizeof(recvbuf), 0,
    177  1.3  pooka 		    (struct sockaddr *)&pingee, &slen)) > 0) {
    178  1.3  pooka 			succ++;
    179  1.3  pooka 		}
    180  1.3  pooka 		if (n == -1 && errno == EAGAIN)
    181  1.3  pooka 			continue;
    182  1.3  pooka 		atf_tc_fail_errno("recv failed");
    183  1.3  pooka 	}
    184  1.3  pooka 
    185  1.3  pooka 	rump_sys_close(s);
    186  1.3  pooka 	return succ;
    187  1.3  pooka }
    188  1.3  pooka 
    189  1.3  pooka #define LOOPS 10000
    190  1.3  pooka 
    191  1.3  pooka ATF_TC_BODY(floodping, tc)
    192  1.3  pooka {
    193  1.3  pooka 	char ifname[IFNAMSIZ];
    194  1.3  pooka 	pid_t cpid;
    195  1.3  pooka 	int succ;
    196  1.3  pooka 
    197  1.2  pooka 	cpid = fork();
    198  1.2  pooka 	rump_init();
    199  1.2  pooka 	netcfg_rump_makeshmif("thank-you-driver-for-getting-me-here", ifname);
    200  1.2  pooka 
    201  1.2  pooka 	switch (cpid) {
    202  1.2  pooka 	case -1:
    203  1.2  pooka 		atf_tc_fail_errno("fork failed");
    204  1.2  pooka 	case 0:
    205  1.2  pooka 		netcfg_rump_if(ifname, "1.1.1.10", "255.255.255.0");
    206  1.2  pooka 		pause();
    207  1.2  pooka 		break;
    208  1.2  pooka 	default:
    209  1.2  pooka 		break;
    210  1.2  pooka 	}
    211  1.2  pooka 
    212  1.2  pooka 	netcfg_rump_if(ifname, "1.1.1.20", "255.255.255.0");
    213  1.2  pooka 
    214  1.3  pooka 	succ = doping("1.1.1.10", LOOPS, 56);
    215  1.3  pooka 	printf("got %d/%d\n", succ, LOOPS);
    216  1.3  pooka 
    217  1.3  pooka 	kill(cpid, SIGKILL);
    218  1.3  pooka }
    219  1.3  pooka 
    220  1.3  pooka ATF_TC(floodping2);
    221  1.3  pooka ATF_TC_HEAD(floodping2, tc)
    222  1.3  pooka {
    223  1.3  pooka 
    224  1.3  pooka 	atf_tc_set_md_var(tc, "descr", "two hosts floodpinging each other");
    225  1.3  pooka 	atf_tc_set_md_var(tc, "use.fs", "true");
    226  1.3  pooka }
    227  1.3  pooka 
    228  1.3  pooka ATF_TC_BODY(floodping2, tc)
    229  1.3  pooka {
    230  1.3  pooka 	char ifname[IFNAMSIZ];
    231  1.3  pooka 	pid_t cpid;
    232  1.3  pooka 	int succ;
    233  1.3  pooka 
    234  1.3  pooka 	cpid = fork();
    235  1.3  pooka 	rump_init();
    236  1.3  pooka 	netcfg_rump_makeshmif("floodping2", ifname);
    237  1.3  pooka 
    238  1.3  pooka 	switch (cpid) {
    239  1.3  pooka 	case -1:
    240  1.3  pooka 		atf_tc_fail_errno("fork failed");
    241  1.3  pooka 	case 0:
    242  1.3  pooka 		netcfg_rump_if(ifname, "1.1.1.10", "255.255.255.0");
    243  1.3  pooka 		succ = doping("1.1.1.20", LOOPS, 56);
    244  1.3  pooka 		break;
    245  1.3  pooka 	default:
    246  1.3  pooka 		netcfg_rump_if(ifname, "1.1.1.20", "255.255.255.0");
    247  1.3  pooka 		succ = doping("1.1.1.10", LOOPS, 56);
    248  1.3  pooka 		break;
    249  1.3  pooka 	}
    250  1.3  pooka 
    251  1.3  pooka 	printf("got %d/%d\n", succ, LOOPS);
    252  1.3  pooka }
    253  1.3  pooka 
    254  1.3  pooka ATF_TC(pingsize);
    255  1.3  pooka ATF_TC_HEAD(pingsize, tc)
    256  1.3  pooka {
    257  1.3  pooka 
    258  1.3  pooka 	atf_tc_set_md_var(tc, "descr", "ping with packets min <= size <= max");
    259  1.3  pooka 	atf_tc_set_md_var(tc, "use.fs", "true");
    260  1.3  pooka }
    261  1.3  pooka 
    262  1.3  pooka ATF_TC_BODY(pingsize, tc)
    263  1.3  pooka {
    264  1.3  pooka 	char ifname[IFNAMSIZ];
    265  1.3  pooka 	pid_t cpid;
    266  1.3  pooka 	int succ, i;
    267  1.3  pooka 
    268  1.3  pooka 	cpid = fork();
    269  1.3  pooka 	rump_init();
    270  1.3  pooka 	netcfg_rump_makeshmif("jippikaiee", ifname);
    271  1.2  pooka 
    272  1.3  pooka 	switch (cpid) {
    273  1.3  pooka 	case -1:
    274  1.3  pooka 		atf_tc_fail_errno("fork failed");
    275  1.3  pooka 	case 0:
    276  1.3  pooka 		netcfg_rump_if(ifname, "1.1.1.10", "255.255.255.0");
    277  1.3  pooka 		pause();
    278  1.3  pooka 		break;
    279  1.3  pooka 	default:
    280  1.3  pooka 		break;
    281  1.3  pooka 	}
    282  1.2  pooka 
    283  1.3  pooka 	netcfg_rump_if(ifname, "1.1.1.20", "255.255.255.0");
    284  1.2  pooka 
    285  1.2  pooka 	succ = 0;
    286  1.2  pooka 
    287  1.3  pooka 	/* small sizes */
    288  1.4  pooka 	for (i = 0 ; i < IP_MAXPACKET - 60000; i++)
    289  1.3  pooka 		succ += doping("1.1.1.10", 1, i);
    290  1.3  pooka 
    291  1.3  pooka 	/* medium sizes */
    292  1.4  pooka 	for (i = IP_MAXPACKET - 60000; i < IP_MAXPACKET - 100; i += 1000)
    293  1.3  pooka 		succ += doping("1.1.1.10", 1, i);
    294  1.3  pooka 
    295  1.3  pooka 	/* big sizes */
    296  1.4  pooka 	for (i = IP_MAXPACKET - 100; i < IP_MAXPACKET; i += 10)
    297  1.3  pooka 		succ += doping("1.1.1.10", 1, i);
    298  1.2  pooka 
    299  1.3  pooka 	printf("got %d/%d\n", succ, IP_MAXPACKET);
    300  1.2  pooka 	kill(cpid, SIGKILL);
    301  1.2  pooka }
    302  1.2  pooka 
    303  1.5  pooka ATF_TC(ping_of_death);
    304  1.5  pooka ATF_TC_HEAD(ping_of_death, tc)
    305  1.5  pooka {
    306  1.5  pooka 
    307  1.5  pooka 	atf_tc_set_md_var(tc, "descr", "send a \"ping of death\"");
    308  1.5  pooka 	atf_tc_set_md_var(tc, "use.fs", "true");
    309  1.6  pooka 	atf_tc_set_md_var(tc, "timeout", "2");
    310  1.5  pooka }
    311  1.5  pooka 
    312  1.5  pooka ATF_TC_BODY(ping_of_death, tc)
    313  1.5  pooka {
    314  1.5  pooka 	char data[1500];
    315  1.5  pooka 	struct sockaddr_in dst;
    316  1.5  pooka 	struct ip *ip;
    317  1.5  pooka 	struct icmp *icmp;
    318  1.5  pooka 	char ifname[IFNAMSIZ];
    319  1.5  pooka 	pid_t cpid;
    320  1.5  pooka 	size_t tot, frag;
    321  1.5  pooka 	int s, x, loop;
    322  1.5  pooka 
    323  1.5  pooka 	cpid = fork();
    324  1.5  pooka 	rump_init();
    325  1.5  pooka 	netcfg_rump_makeshmif("jippikaiee", ifname);
    326  1.5  pooka 
    327  1.5  pooka 	switch (cpid) {
    328  1.5  pooka 	case -1:
    329  1.5  pooka 		atf_tc_fail_errno("fork failed");
    330  1.5  pooka 	case 0:
    331  1.5  pooka 		/* wait until we receive a too long IP packet */
    332  1.5  pooka 		for (loop = 0;; loop++) {
    333  1.5  pooka 			uint64_t ipstat[IP_NSTATS];
    334  1.5  pooka 			size_t arglen;
    335  1.5  pooka 			int mib[4];
    336  1.5  pooka 
    337  1.5  pooka 			if (loop == 1)
    338  1.5  pooka 				netcfg_rump_if(ifname,
    339  1.5  pooka 				    "1.1.1.10", "255.255.255.0");
    340  1.5  pooka 
    341  1.5  pooka 			mib[0] = CTL_NET;
    342  1.5  pooka 			mib[1] = PF_INET;
    343  1.5  pooka 			mib[2] = IPPROTO_IP;
    344  1.5  pooka 			mib[3] = IPCTL_STATS;
    345  1.5  pooka 
    346  1.5  pooka 			arglen = sizeof(ipstat);
    347  1.5  pooka 			RL(rump_sys___sysctl(mib, 4, &ipstat, &arglen,
    348  1.5  pooka 			    NULL, 0));
    349  1.5  pooka 			if (loop == 0 && ipstat[IP_STAT_TOOLONG] != 0)
    350  1.5  pooka 				_exit(1);
    351  1.5  pooka 			if (ipstat[IP_STAT_TOOLONG])
    352  1.5  pooka 				break;
    353  1.5  pooka 			usleep(10000);
    354  1.5  pooka 		}
    355  1.5  pooka 
    356  1.5  pooka 		_exit(0);
    357  1.5  pooka 		break;
    358  1.5  pooka 	default:
    359  1.5  pooka 		break;
    360  1.5  pooka 	}
    361  1.5  pooka 
    362  1.5  pooka 	netcfg_rump_if(ifname, "1.1.1.20", "255.255.255.0");
    363  1.5  pooka 
    364  1.5  pooka 	RL(s = rump_sys_socket(PF_INET, SOCK_RAW, 0));
    365  1.5  pooka 	x = 1;
    366  1.5  pooka 	RL(rump_sys_setsockopt(s, IPPROTO_IP, IP_HDRINCL, &x, sizeof(x)));
    367  1.5  pooka 
    368  1.5  pooka 	memset(&dst, 0, sizeof(dst));
    369  1.5  pooka 	dst.sin_len = sizeof(dst);
    370  1.5  pooka 	dst.sin_family = AF_INET;
    371  1.5  pooka 	dst.sin_addr.s_addr = inet_addr("1.1.1.10");
    372  1.5  pooka 
    373  1.5  pooka 	/* construct packet */
    374  1.5  pooka 	memset(data, 0, sizeof(data));
    375  1.5  pooka 	ip = (struct ip *)data;
    376  1.5  pooka 	ip->ip_v = 4;
    377  1.5  pooka 	ip->ip_hl = sizeof(*ip) >> 2;
    378  1.5  pooka 	ip->ip_p = IPPROTO_ICMP;
    379  1.5  pooka 	ip->ip_ttl = IPDEFTTL;
    380  1.5  pooka 	ip->ip_dst = dst.sin_addr;
    381  1.5  pooka 	ip->ip_id = 1234;
    382  1.5  pooka 
    383  1.5  pooka 	icmp = (struct icmp *)(ip + 1);
    384  1.5  pooka 	icmp->icmp_type = ICMP_ECHO;
    385  1.5  pooka 	icmp->icmp_cksum = in_cksum(icmp, sizeof(*icmp));
    386  1.5  pooka 
    387  1.5  pooka 	for (;;) {
    388  1.5  pooka 		int status;
    389  1.5  pooka 
    390  1.5  pooka 		/* resolve arp before sending raw stuff */
    391  1.5  pooka 		netcfg_rump_pingtest("1.1.1.10", 1);
    392  1.5  pooka 
    393  1.5  pooka 		for (tot = 0;
    394  1.5  pooka 		    tot < 65538 - sizeof(*ip);
    395  1.5  pooka 		    tot += (frag - sizeof(*ip))) {
    396  1.5  pooka 			frag = MIN(65538 - tot, sizeof(data));
    397  1.5  pooka 			ip->ip_off = tot >> 3;
    398  1.5  pooka 			assert(ip->ip_off << 3 == tot);
    399  1.5  pooka 			ip->ip_len = frag;
    400  1.5  pooka 
    401  1.5  pooka 			if (frag == sizeof(data)) {
    402  1.5  pooka 				ip->ip_off |= IP_MF;
    403  1.5  pooka 			}
    404  1.5  pooka 
    405  1.5  pooka 			RL(rump_sys_sendto(s, data, frag, 0,
    406  1.5  pooka 			    (struct sockaddr *)&dst, sizeof(dst)));
    407  1.5  pooka 		}
    408  1.5  pooka 		if (waitpid(-1, &status, WNOHANG) > 0) {
    409  1.5  pooka 			if (WIFEXITED(status) && WEXITSTATUS(status) == 0)
    410  1.5  pooka 				break;
    411  1.5  pooka 			atf_tc_fail("child did not exit clean");
    412  1.5  pooka 		}
    413  1.5  pooka 
    414  1.5  pooka 		usleep(10000);
    415  1.5  pooka 	}
    416  1.5  pooka }
    417  1.5  pooka 
    418  1.1  pooka ATF_TP_ADD_TCS(tp)
    419  1.1  pooka {
    420  1.1  pooka 
    421  1.1  pooka 	ATF_TP_ADD_TC(tp, simpleping);
    422  1.2  pooka 	ATF_TP_ADD_TC(tp, floodping);
    423  1.3  pooka 	ATF_TP_ADD_TC(tp, floodping2);
    424  1.3  pooka 	ATF_TP_ADD_TC(tp, pingsize);
    425  1.5  pooka 	ATF_TP_ADD_TC(tp, ping_of_death);
    426  1.1  pooka 
    427  1.1  pooka 	return atf_no_error();
    428  1.1  pooka }
    429