diff options
author | glebius <glebius@FreeBSD.org> | 2014-03-14 02:58:48 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2014-03-14 02:58:48 +0000 |
commit | d494babace1c51efd0d2c4582515a1e1ae5fa9d2 (patch) | |
tree | 289644ca4a3bc9d349466888b297c5a34d00e321 /tools/regression/netipx/spxabort/spxabort.c | |
parent | a4fb4957a59109b80df9cabe72982fd067c6f5d1 (diff) | |
download | FreeBSD-src-d494babace1c51efd0d2c4582515a1e1ae5fa9d2.zip FreeBSD-src-d494babace1c51efd0d2c4582515a1e1ae5fa9d2.tar.gz |
Remove IPX support.
IPX was a network transport protocol in Novell's NetWare network operating
system from late 80s and then 90s. The NetWare itself switched to TCP/IP
as default transport in 1998. Later, in this century the Novell Open
Enterprise Server became successor of Novell NetWare. The last release
that claimed to still support IPX was OES 2 in 2007. Routing equipment
vendors (e.g. Cisco) discontinued support for IPX in 2011.
Thus, IPX won't be supported in FreeBSD 11.0-RELEASE.
Diffstat (limited to 'tools/regression/netipx/spxabort/spxabort.c')
-rw-r--r-- | tools/regression/netipx/spxabort/spxabort.c | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/tools/regression/netipx/spxabort/spxabort.c b/tools/regression/netipx/spxabort/spxabort.c deleted file mode 100644 index 8b6537f..0000000 --- a/tools/regression/netipx/spxabort/spxabort.c +++ /dev/null @@ -1,96 +0,0 @@ -/*- - * Copyright (c) 2006 Robert N. M. Watson - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -/* - * Exercise the pru_abort() code for SPX by opening an SPX connection to a - * listen socket, then closing the listen socket before accepting. - * - * We would also like to be able to test the other two abort cases, in which - * incomplete connections are aborted due to overflow, and due to close of - * the listen socket, but that requires a packet level test rather than using - * the socket API. - */ - -#include <sys/types.h> -#include <sys/socket.h> - -#include <netipx/ipx.h> - -#include <err.h> -#include <errno.h> -#include <fcntl.h> -#include <stdio.h> -#include <string.h> -#include <unistd.h> - -#define IPX_ENDPOINT "0xbebe.1.0x8a13" - -int -main(int argc, char *argv[]) -{ - struct sockaddr_ipx sipx; - int sock_listen, sock; - - sock_listen = socket(PF_IPX, SOCK_STREAM, 0); - if (sock_listen < 0) - err(-1, "sock_listen = socket(PF_IPX, SOCK_STREAM, 0)"); - - bzero(&sipx, sizeof(sipx)); - sipx.sipx_len = sizeof(sipx); - sipx.sipx_family = AF_IPX; - sipx.sipx_addr = ipx_addr(IPX_ENDPOINT); - - if (bind(sock_listen, (struct sockaddr *)&sipx, sizeof(sipx)) < 0) - err(-1, "bind(sock_listen)"); - - if (listen(sock_listen, -1) < 0) - err(-1, "listen(sock_listen)"); - - sock = socket(PF_IPX, SOCK_STREAM, 0); - if (sock < 0) - err(-1, "sock = socket(PF_IPX, SOCK_STREAM, 0)"); - - bzero(&sipx, sizeof(sipx)); - sipx.sipx_len = sizeof(sipx); - sipx.sipx_family = AF_IPX; - sipx.sipx_addr = ipx_addr(IPX_ENDPOINT); - - if (fcntl(sock, F_SETFL, O_NONBLOCK) < 0) - err(-1, "fcntl(sock, F_SETFL, O_NONBLOCKING)"); - - if (connect(sock, (struct sockaddr *)&sipx, sizeof(sipx)) < 0) { - if (errno != EINPROGRESS) - err(-1, "sock = socket(PF_IPX, SOCK_STREAM, 0)"); - } - - sleep(1); /* Arbitrary. */ - - close(sock_listen); - - return (0); -}; |