From bf76d5fe76f413a1936d903caec0d4e600995ce0 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 30 Apr 2018 10:37:59 +0200 Subject: network: Import latest from FreeBSD Update #3419. --- cpukit/headers.am | 4 ++ cpukit/include/arpa/ftp.h | 109 ++++++++++++++++++++++++++++++++++++++++ cpukit/libnetworking/arpa/ftp.h | 109 ---------------------------------------- cpukit/libnetworking/headers.am | 1 - 4 files changed, 113 insertions(+), 110 deletions(-) create mode 100644 cpukit/include/arpa/ftp.h delete mode 100644 cpukit/libnetworking/arpa/ftp.h diff --git a/cpukit/headers.am b/cpukit/headers.am index 66efcb5c58..2315db1e7d 100644 --- a/cpukit/headers.am +++ b/cpukit/headers.am @@ -22,6 +22,10 @@ include_HEADERS += include/xz.h include_HEADERS += include/zconf.h include_HEADERS += include/zlib.h +include_arpadir = $(includedir)/arpa +include_arpa_HEADERS = +include_arpa_HEADERS += include/arpa/ftp.h + include_dev_i2cdir = $(includedir)/dev/i2c include_dev_i2c_HEADERS = include_dev_i2c_HEADERS += include/dev/i2c/eeprom.h diff --git a/cpukit/include/arpa/ftp.h b/cpukit/include/arpa/ftp.h new file mode 100644 index 0000000000..4f23e1ca40 --- /dev/null +++ b/cpukit/include/arpa/ftp.h @@ -0,0 +1,109 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1983, 1989, 1993 + * The Regents of the University of California. 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. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + * + * @(#)ftp.h 8.1 (Berkeley) 6/2/93 + * + * $FreeBSD: head/include/arpa/ftp.h 326024 2017-11-20 19:45:28Z pfg $ + */ + +#ifndef _ARPA_FTP_H_ +#define _ARPA_FTP_H_ + +/* Definitions for FTP; see RFC-765. */ + +/* + * Reply codes. + */ +#define PRELIM 1 /* positive preliminary */ +#define COMPLETE 2 /* positive completion */ +#define CONTINUE 3 /* positive intermediate */ +#define TRANSIENT 4 /* transient negative completion */ +#define ERROR 5 /* permanent negative completion */ + +/* + * Type codes + */ +#define TYPE_A 1 /* ASCII */ +#define TYPE_E 2 /* EBCDIC */ +#define TYPE_I 3 /* image */ +#define TYPE_L 4 /* local byte size */ + +#ifdef FTP_NAMES +char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" }; +#endif + +/* + * Form codes + */ +#define FORM_N 1 /* non-print */ +#define FORM_T 2 /* telnet format effectors */ +#define FORM_C 3 /* carriage control (ASA) */ +#ifdef FTP_NAMES +char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" }; +#endif + +/* + * Structure codes + */ +#define STRU_F 1 /* file (no record structure) */ +#define STRU_R 2 /* record structure */ +#define STRU_P 3 /* page structure */ +#ifdef FTP_NAMES +char *strunames[] = {"0", "File", "Record", "Page" }; +#endif + +/* + * Mode types + */ +#define MODE_S 1 /* stream */ +#define MODE_B 2 /* block */ +#define MODE_C 3 /* compressed */ +#ifdef FTP_NAMES +char *modenames[] = {"0", "Stream", "Block", "Compressed" }; +#endif + +/* + * Record Tokens + */ +#define REC_ESC '\377' /* Record-mode Escape */ +#define REC_EOR '\001' /* Record-mode End-of-Record */ +#define REC_EOF '\002' /* Record-mode End-of-File */ + +/* + * Block Header + */ +#define BLK_EOR 0x80 /* Block is End-of-Record */ +#define BLK_EOF 0x40 /* Block is End-of-File */ +#define BLK_ERRORS 0x20 /* Block is suspected of containing errors */ +#define BLK_RESTART 0x10 /* Block is Restart Marker */ + +#define BLK_BYTECOUNT 2 /* Bytes in this block */ + +#endif /* !_FTP_H_ */ diff --git a/cpukit/libnetworking/arpa/ftp.h b/cpukit/libnetworking/arpa/ftp.h deleted file mode 100644 index 9a36488540..0000000000 --- a/cpukit/libnetworking/arpa/ftp.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 1983, 1989, 1993 - * The Regents of the University of California. 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * @(#)ftp.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _ARPA_FTP_H_ -#define _ARPA_FTP_H_ - -/* Definitions for FTP; see RFC-765. */ - -/* - * Reply codes. - */ -#define PRELIM 1 /* positive preliminary */ -#define COMPLETE 2 /* positive completion */ -#define CONTINUE 3 /* positive intermediate */ -#define TRANSIENT 4 /* transient negative completion */ -#define ERROR 5 /* permanent negative completion */ - -/* - * Type codes - */ -#define TYPE_A 1 /* ASCII */ -#define TYPE_E 2 /* EBCDIC */ -#define TYPE_I 3 /* image */ -#define TYPE_L 4 /* local byte size */ - -#ifdef FTP_NAMES -char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" }; -#endif - -/* - * Form codes - */ -#define FORM_N 1 /* non-print */ -#define FORM_T 2 /* telnet format effectors */ -#define FORM_C 3 /* carriage control (ASA) */ -#ifdef FTP_NAMES -char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" }; -#endif - -/* - * Structure codes - */ -#define STRU_F 1 /* file (no record structure) */ -#define STRU_R 2 /* record structure */ -#define STRU_P 3 /* page structure */ -#ifdef FTP_NAMES -char *strunames[] = {"0", "File", "Record", "Page" }; -#endif - -/* - * Mode types - */ -#define MODE_S 1 /* stream */ -#define MODE_B 2 /* block */ -#define MODE_C 3 /* compressed */ -#ifdef FTP_NAMES -char *modenames[] = {"0", "Stream", "Block", "Compressed" }; -#endif - -/* - * Record Tokens - */ -#define REC_ESC '\377' /* Record-mode Escape */ -#define REC_EOR '\001' /* Record-mode End-of-Record */ -#define REC_EOF '\002' /* Record-mode End-of-File */ - -/* - * Block Header - */ -#define BLK_EOR 0x80 /* Block is End-of-Record */ -#define BLK_EOF 0x40 /* Block is End-of-File */ -#define BLK_ERRORS 0x20 /* Block is suspected of containing errors */ -#define BLK_RESTART 0x10 /* Block is Restart Marker */ - -#define BLK_BYTECOUNT 2 /* Bytes in this block */ - -#endif /* !_FTP_H_ */ diff --git a/cpukit/libnetworking/headers.am b/cpukit/libnetworking/headers.am index 93dce6ef8f..b558d4b416 100644 --- a/cpukit/libnetworking/headers.am +++ b/cpukit/libnetworking/headers.am @@ -10,7 +10,6 @@ include_HEADERS += resolv.h include_arpadir = $(includedir)/arpa include_arpa_HEADERS = -include_arpa_HEADERS += arpa/ftp.h include_arpa_HEADERS += arpa/nameser.h include_arpa_HEADERS += arpa/nameser_compat.h -- cgit v1.2.3