⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test.h

📁 wm PNE 3.3 source code, running at more than vxworks6.x version.
💻 H
字号:
/* $Header: /usr/cvsroot/target/src/wrn/wm/demo/socktest/test.h,v 1.2 2001/11/09 22:10:14 josh Exp $ *//* * Copyright (C) 1999-2005 Wind River Systems, Inc. * All rights reserved.  Provided under license only. * Distribution or other use of this software is only * permitted pursuant to the terms of a license agreement * from Wind River Systems (and is otherwise prohibited). * Refer to that license agreement for terms of use. *//**************************************************************************** *  Copyright 1998-1999 Integrated Systems, Inc. *  All rights reserved. ****************************************************************************//* * $Log: test.h,v $ * Revision 1.2  2001/11/09 22:10:14  josh * socktest path modifications, first pass * * Revision 1.1.1.1  2001/11/05 17:49:14  tneale * Tornado shuffle * * Revision 1.17  2001/03/02 19:16:25  paul * Added snark.h for the psos version of sleep(). * * Revision 1.16  2001/01/19 22:24:54  paul * Update copyright. * * Revision 1.15  2000/10/27 18:05:53  paul * Removed duplicate includes from BSD section. * Removed hardwired default server address. * * Revision 1.14  2000/10/16 19:22:08  paul * Restore sockets and mempool code. * * Revision 1.12  2000/03/17 00:14:46  meister * Update copyright message * * Revision 1.11  1999/09/21 17:52:39  paul * Reorder include files to avoid redefinition of timeval in BSD. * * Revision 1.10  1999/07/30 21:29:39  paul * enhanced test_fail, test_pass * * Revision 1.8  1999/05/13 17:59:18  paul * Restored sockport.h to sockets.h, so remove it from here. * * Revision 1.7  1999/05/13 00:27:42  wes * XXX Kludge to allow test to continue to build: * include sockport.h so we see the def'n of errno. * * Revision 1.6  1999/05/03 20:49:53  wes * Unbreak test_multitask by including attthd.h here * * Revision 1.5  1999/05/03 19:22:14  paul * Added test_pass(), test_close(). * * Revision 1.4  1999/02/18 04:15:56  wes * Socket Merge: new code (socket tests). * * Revision 1.3.2.12  1999/01/06 21:41:53  paul * added configurable server address * * Revision 1.3.2.11  1998/12/22 20:26:46  wes * First cut at multi-threaded socket test. * * Revision 1.3.2.10  1998/11/20 16:19:58  paul * freestanding ttcp * * Revision 1.3.2.9  1998/11/06 23:36:48  paul * rototill to support tcp * *//* [clearcase]modification history-------------------01a,19apr05,job  update copyright notices*/#ifndef _TEST_H#define _TEST_H#if defined (TEST_BSD)#include <stdio.h>		/* printf, perror */#include <signal.h>#include <stdlib.h>#include <ctype.h>#include <sys/types.h>#include <unistd.h>		/* bsd version of io.h? */#include <errno.h>		/* errno */#include <string.h>		/* strerror */#include <sys/uio.h>		/* for iovec, but should be automagic */#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>		/* inet_ntoa */#include <netdb.h>#include <sys/time.h>#include <sys/ioctl.h>#include <net/if.h>#else#include <wrn/wm/util/common/config.h>#include <wrn/wm/util/common/types.h>#include <wrn/wm/util/common/glue.h>#include <wrn/wm/attache/ipaddr.h>#include <wrn/wm/attache/ip.h>#include <wrn/wm/attache/udp.h>#include <wrn/wm/attache/attthd.h>/* snark.h is out of the expected order, because sockets.h redefines * function and symbol names that may be prototyped in files included * from snark.h. */#include <snark.h>#include <wrn/wm/attache/sockets.h>char *str_ipaddr(ipaddr_t *ip);char *str_ip_conn(struct ip_conn *ipc);char *str_udp_conn(struct udp_conn *udpc);void test_main(int argc, char *argv[]);#define main sock_main#endif /* !TEST_BSD *//* numeric IP address of a machine running udp/tcp discard/echo servers */extern unsigned long server;extern int verbose;extern int quiet;#define TEST_UDP 1#define TEST_TCP 2#define TEST_RAW 4extern void test_pass (char *proto, char *test_name, char *what);extern void test_fail (char *proto, char *test_name, char *what);extern void test_init(void);extern void test_summarize(void);int test(char *proto, char *name, int result, int expected, int expected_errno);void pr_sockaddr_in(struct sockaddr_in *si);int pr_sockname(int s);int pr_peername(int s);void test_socket(int flags);void test_bind(int flags);void test_accept(int flags);void test_sendto(int flags);void test_connect(int flags);void test_send(int flags);void test_getsockname(int flags);void test_getpeername(int flags);void test_ioctl(int flags);void test_recvfrom(int flags);void test_recv(int flags);void test_select(int flags);void test_sendmsg(int flags);void test_recvmsg(int flags);void test_shutdown(int flags);void test_accept(int flags);void test_multitask(int flags);void test_close(int flags);#endif /* _TEST_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -