source: rtems-libbsd/rtemsbsd/include/machine/rtems-bsd-config.h @ 45960a3

55-freebsd-126-freebsd-12freebsd-9.3
Last change on this file since 45960a3 was 90873cc, checked in by Chris Johns <chrisj@…>, on 06/28/16 at 03:32:01

Add ftpd as a service. Add rtems-bsd-config.h for app libbsd set up.

  • Property mode set to 100644
File size: 4.0 KB
Line 
1/*
2 * Copyright (c) 2016 Chris Johns <chrisj@rtems.org>.  All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 *    notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 *    notice, this list of conditions and the following disclaimer in the
11 *    documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 */
25
26/*
27 * Configure the LibBSD software stack.
28 *
29 * Configuration defines:
30 *
31 *  RTEMS_BSD_CONFIG_NET_PF_UNIX     : Packet Filter.
32 *  RTEMS_BSD_CONFIG_NET_IF_LAGG     : Link Aggregetion and Failover.
33 *  RTEMS_BSD_CONFIG_NET_IF_VLAN     : Virtual LAN.
34 *  RTEMS_BSD_CONFIG_SERVICE_FTPD    : File Transfer Protocol (FTP).
35 *  RTEMS_BSD_CONFIG_BSP_CONFIG      : Configure default BSP devices.
36 *  RTEMS_BSD_CONFIG_INIT            : Configure the LibBSD support.
37 *
38 * Rules for adding to this file:
39 *  1. All user visible defines start with 'RTEMS_BSD_CONFIG_'.
40 *  2. Define an implementation define starting with 'RTEMS_BSD_CFGDECL_'.
41 *  3. Only declare anything in the 'RTEMS_BSD_CONFIG_INIT' section.
42 *  4. Do not use '#ifdef ..' or '#ifndef ..'.
43 *  5. All '#endif' statements need a comment showing the '#if ..' logic.
44 */
45
46#ifndef _RTEMS_BSD_CONFIG_h
47#define _RTEMS_BSD_CONFIG_h
48
49#include <stdbool.h>
50
51/*
52 * Include the Nexus bus.
53 */
54#include <machine/rtems-bsd-nexus-bus.h>
55
56/*
57 * Include the SYSINIT support.
58 */
59#include <machine/rtems-bsd-sysinit.h>
60
61/*
62 * Include the services.
63 */
64#include <machine/rtems-bsd-rc-conf-services.h>
65
66#ifdef __cplusplus
67//extern "C" {
68#endif /* __cplusplus */
69
70/*
71 * BSD Kernel modules.
72 */
73
74/*
75 * Unix packet filter.
76 *  https://www.freebsd.org/doc/handbook/firewalls-pf.html
77 */
78#if defined(RTEMS_BSD_CONFIG_NET_PF_UNIX)
79 #define RTEMS_BSD_CFGDECL_NET_PF_UNIX SYSINIT_NEED_NET_PF_UNIX
80#endif /* RTEMS_BSD_CONFIG_NET_PF_UNIX */
81
82/*
83 * Link Aggregation and Failover.
84 *  https://www.freebsd.org/doc/handbook/network-aggregation.html
85 */
86#if defined(RTEMS_BSD_CONFIG_NET_IF_LAGG)
87 #define RTEMS_BSD_CFGDECL_IF_LAGG SYSINIT_NEED_NET_IF_LAGG
88#endif /* RTEMS_BSD_CONFIG_NET_IF_LAGG */
89
90/*
91 * Virtual LAN
92 *  https://www.freebsd.org/cgi/man.cgi?query=rc.conf then 'network_interfaces'.
93 */
94#if defined(RTEMS_BSD_CONFIG_NET_IF_VLAN)
95 #define RTEMS_BSD_CFGDECL_NET_IF_VLAN SYSINIT_NEED_NET_IF_VLAN
96#endif /* RTEMS_BSD_CONFIG_NET_IF_VLAN */
97
98/*
99 * FTPD
100 */
101#if defined(RTEMS_BSD_CONFIG_SERVICE_FTPD)
102 #define RTEMS_BSD_CFGDECL_FTPD RTEMS_BSD_RC_CONF_SYSINT(rc_conf_ftpd)
103#endif /* RTEMS_BSD_CONFIG_SERVICE_FTPD */
104
105/*
106 * Configure the system.
107 */
108#if defined(RTEMS_BSD_CONFIG_INIT)
109 /*
110  * If a BSP configuration is requested include the Nexus bus BSP configuration.
111  */
112 #if defined(RTEMS_BSD_CONFIG_BSP_CONFIG)
113  #include <bsp/nexus-devices.h>
114 #endif
115
116 /*
117  * Create the networking modules and interfaces.
118  */
119 RTEMS_BSD_CFGDECL_NET_PF_UNIX;
120 RTEMS_BSD_CFGDECL_IF_LAGG;
121 RTEMS_BSD_CFGDECL_NET_IF_VLAN;
122
123 /*
124  * Create the services.
125  */
126 RTEMS_BSD_CFGDECL_FTPD;
127#endif /* RTEMS_BSD_CONFIG_INIT */
128
129#ifdef __cplusplus
130}
131#endif /* __cplusplus */
132
133#endif /* _RTEMS_BSD_CONFIG_h */
Note: See TracBrowser for help on using the repository browser.