EWiLi'16, the 6th Embedded Operating System Workshop held in conjunction with ESWEEK

2016-04-25 Thread Joel Sherrill
Hi

Preliminary CFP is online here: https://goo.gl/IftMrv

Full text below:

***
+ p 61, second column, third sentence - "require internal routing
Call For Papers
EWiLi'16, the 6th Embedded Operating System Workshop held in conjunction
with ESWEEK
During ESWEEK 2-7 October 2016, PITTSBURGH, PA, USA
Submission deadline: 11 July 2016

http://syst.univ-brest.fr/ewili2016
***

Aim and Scopes
EWiLi, the embedded operating system workshop, aims at presenting
state-of-the-art research, experimentations, significant and original
realizations that focus on the design and implementation of embedded
operating systems in both academic and industrial worlds.

Expected contributions include but are not limited to the following topics,
but should all consider embedded operating systems :
  - Reconfigurable architectures
  - Heterogeneous MPSOC and Multicore
  - Sensor networks
  - Multimedia systems
  - Cyber physical systems
  - Internet of things
  - Methods, software and tool chains
  - Model-driven Engineering
  - Data management and memory hierarchy optimization
  - Real-time, concurrency, scheduling and temporal performance
  - File systems, storage,  and I/Os in embedded operating systems
  - Debug and profiling
  - Energy and power optimization
  - Performance evaluation and optimization
  - Safety and security concerns
  - Case studies and application projects
  - Embedded operating systems and education


Submissions & publication

Submission link: https://easychair.org/conferences/?conf=ewili16

Papers should not exceed 6 pages in ACM SIG format (see
http://sigbed.seas.upenn.edu/submit.html )

All accepted papers will be published in the ACM SIGBED Review (ISSN:
1551-3688) Special Interest Group on Embedded Systems.

Important dates:
Submission deadline:11 July 2016
Notifications to authors:   19 August 2016
Camera ready versions:  19 September 2016

Steering committee (to be completed):
Jalil BOUKHOBZA (Associate professor, Lab-STICC/University of
Western Brittany, France)
Marco Dominico SANTAMBROGIO (Polytech. Milano, Italy)
Frank SINGHOFF  (Professor, Lab-STICC/University of Western
Brittany, France)
  Contact: boukho...@univ-brest.fr

Publicity chairs
Giuseppe LIPARI (Univ. Lilles, France)
Duo Liu (Chongqing Univ., China)
Program committee (to be completed/confirmed)
 Mario ALDEA-RIVAS   (Univ. de Cantabria, Spain)
 Sébastien BILAVARN  (LEAT/Univ. Nice, France)
 Gedare BLOOM(Howard University, USA)
 Julien BOIBESSOT(Armadeus Systems, France)
 Jalil BOUKHOBZA (Lab-STICC/Univ. Western Brittany, France)
 Eric GRESSIER   (CNAM Paris, France)
 Emmanuel GROLLEAU   (LIAS, ISAE-ENSMA, France)
 Dionisio DE NIZ (SEI, Carnegie Mellon University, USA)
 Jean Philippe DIGUET(Lab-STICC/ Univ. Of South Brittany, France)
 Henrique DOMINGOS   (FCT/Univ. Nova de Lisboa, Portugal)
 Pierre FICHEUX  (Openwide, France)
 Ann GORDON-ROSS (Univ. of Florida, USA)
 Henry HOFFMANN  (University of Chicago, USA)
 Michael HUEBNER (Ruhr-University of Bochum, Germany)
 Jérôme HUGUES   (ISAE, France)
 Mathieu JAN (CEA, France)
 Patrice KADIONIK(ENSEIRB, France)
 Mouloud KOUDIL  (ESI, Algeria)
 John KUBIATOWICZ(Univ. of California Berkeley, USA)
 Giuseppe LIPARI (Univ. Lilles, France)
 Duo Liu (Chongqing Univ., China)
 Manolis MARAZAKIS   (ICS FORTH, Greece)
 Pierre Olivier  (Virginia Tech, USA)
 Laurent PAUTET  (Telecom Paris-Tech, France)
 Luis Miguel PINHO   (CISTER/ISEP, Portugal)
 Juan Antonio de la PUENTE (DIT-UPM, Spain)
 José RUFINO (FCUL, Portugal)
 José RUIZ   (AdaCore, France)
 Marco D. SANTAMBROGIO   (Polytech. Milano, Italy)
 Eric SENN   (Lab-STICC/Univ. of South Brittany, France)
 Joel SHERRILL   (OAR Corporation, USA)
 Frank SINGHOFF  (Lab-STICC/Univ. Western Brittany, France)
 Frank SIQUEIRA  (Univ. Federal de Santa Catarina, Brasil)
 Zili SHAO   (Polytechnic Univ. Hong Kong, Hong Kong)
 Oleg SOKOLSKY   (University of Pennsylvania, USA)
 Jon SOLWORTH(University of Illinois, USA)
 John WILLIAMS   (ex. PetaLogix/Xilinx, Australia)
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 00/13] Replace mongoose with civetweb.

2016-04-25 Thread Christian Mauderer
Essentially I agree that it would be nice to build civetweb as an
external library especially with the different network stacks in mind.
But there are some points that keep me from doing it:

1. I have really no Idea what would be necessary to build it as an
upstream project using RSB. If that are only something like three simple
steps, it should be possible to squeeze it in the little time budget
that is left for the project. If I first have to analyze and change a
lot of RSB, it would be challenging.

Chris, I think you know the RSB best: What steps do you think would be
necessary?

2. Currently there is one test case for mghttpd (libtests/mghttpd01).
This is one of the few tests that check some networking functions in
RTEMS. Further we should not loose the ability to test software when it
is build with RSB. How would we handle tests for software in RSB?

Kind regards

Christian Mauderer

Am 23.04.2016 um 15:07 schrieb Joel Sherrill:
> I am really with Gedare and Chris that it would be better to treat this
> as an upstream project. Use the RSB and track patches through RTEMS tools.
> 
> It would be a good case to push the model of a single network service
> supporting both stacks and begin the process of removing networking code
> from the base RTEMS git repo.
> 
> It would also push us to figure out how to rest RSB built packages.
> 
> On Apr 22, 2016 12:05 AM, "Christian Mauderer"
>  > wrote:
> 
> Yes that's right. 05/13 just adds the unchanged sources from civetweb.
> Beneath civetweb.c and civetweb.h it also adds handle_form.inl and
> md5.inl. The last two files are included into civetweb.c. According to
> the documentation "The *INL* file extension represents code that is
> statically included inline in a source file."
> 
> And yes: The patch didn't get through. I have got a replay that "Your
> message to devel awaits moderator approval". The civetweb.c file is over
> 300k and the mailing list seems to have a maximum of 256k. I hoped that
> one of the mail admins would approve the patch soon.
> 
> Am 21.04.2016 um 22:49 schrieb Gedare Bloom:
> > I think patch 05/13 probably adds civetweb.c and civetweb.h? But it
> > did not come through the mailman.
> >
> > On Thu, Apr 21, 2016 at 4:46 PM, Gedare Bloom  > wrote:
> >> P.S. might be worth it to open a ticket related to civetweb and
> >> #update it from these patches.
> >>
> >> On Thu, Apr 21, 2016 at 4:45 PM, Gedare Bloom  > wrote:
> >>> Is the plan eventually to be able to use the upstream civetweb?
> or to
> >>> track it with our own copy?
> >>>
> >>> On Thu, Apr 21, 2016 at 4:49 AM, Christian Mauderer
> >>>  > wrote:
>  This patch series replaces the mongoose webserver by its still MIT
>  licensed fork civetweb.
> 
>  Please note that I try to get some (currently two) of the patches
>  directly into civetweb too. But I think that it might need some
> time and
>  adaption till they are accepted. So I thought that adding them
> to RTEMS
>  would still make sense as a working interim solution.
> 
>  ___
>  devel mailing list
>  devel@rtems.org 
>  http://lists.rtems.org/mailman/listinfo/devel
> 
> --
> 
> embedded brains GmbH
> Christian Mauderer
> Dornierstr. 4
> D-82178 Puchheim
> Germany
> email: christian.maude...@embedded-brains.de
> 
> Phone: +49-89-18 94 741 - 18 
> Fax:   +49-89-18 94 741 - 08 
> PGP: Public key available on request.
> 
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
> ___
> devel mailing list
> devel@rtems.org 
> http://lists.rtems.org/mailman/listinfo/devel
> 

-- 

embedded brains GmbH
Christian Mauderer
Dornierstr. 4
D-82178 Puchheim
Germany
email: christian.maude...@embedded-brains.de
Phone: +49-89-18 94 741 - 18
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

GSoC 2016: Low Level Peripherals & SD Card Support for Raspberry Pi

2016-04-25 Thread Martin Galvan
Hi everyone! Just wanted to check on the status for this project. I
saw it was accepted for the GSoC 2016 (congratulations Mudit!), and
would like to know what our workflow will be like. I offered to
co-mentor it and help with code/documentation reviews, especially for
the SD card parts since I did a bit of work with those in the past.

(It seems that only I clicked on "Want to Mentor", however, so the
Google thing assigned it to me. Not sure on how to proceed there).

I don't usually hang in IRC; I prefer e-mails on devel if it's not too
much a hassle.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: GSoC 2016: Low Level Peripherals & SD Card Support for Raspberry Pi

2016-04-25 Thread Martin Galvan
CCing Andre.

On Mon, Apr 25, 2016 at 10:23 AM, Martin Galvan
 wrote:
> Hi everyone! Just wanted to check on the status for this project. I
> saw it was accepted for the GSoC 2016 (congratulations Mudit!), and
> would like to know what our workflow will be like. I offered to
> co-mentor it and help with code/documentation reviews, especially for
> the SD card parts since I did a bit of work with those in the past.
>
> (It seems that only I clicked on "Want to Mentor", however, so the
> Google thing assigned it to me. Not sure on how to proceed there).
>
> I don't usually hang in IRC; I prefer e-mails on devel if it's not too
> much a hassle.



-- 


Martin Galvan

Software Engineer

Taller Technologies Argentina


San Lorenzo 47, 3rd Floor, Office 5

Córdoba, Argentina

Phone: 54 351 4217888 / +54 351 4218211
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH 10/29] libnetworking: Fix unknown struct ifnet and ifaddr.'

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/net/rtsock.c | 1 +
 cpukit/libnetworking/netinet/ip_fw.c  | 1 +
 cpukit/libnetworking/netinet/tcp_input.c  | 1 +
 cpukit/libnetworking/rtems/rtems_showifstat.c | 1 +
 cpukit/libnetworking/rtems/rtems_showroute.c  | 1 +
 5 files changed, 5 insertions(+)

diff --git a/cpukit/libnetworking/net/rtsock.c 
b/cpukit/libnetworking/net/rtsock.c
index 5a03122..c6b6d11 100644
--- a/cpukit/libnetworking/net/rtsock.c
+++ b/cpukit/libnetworking/net/rtsock.c
@@ -48,6 +48,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
diff --git a/cpukit/libnetworking/netinet/ip_fw.c 
b/cpukit/libnetworking/netinet/ip_fw.c
index 4b00596..3ee8697 100644
--- a/cpukit/libnetworking/netinet/ip_fw.c
+++ b/cpukit/libnetworking/netinet/ip_fw.c
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/netinet/tcp_input.c 
b/cpukit/libnetworking/netinet/tcp_input.c
index de4981d..bbd1b16 100644
--- a/cpukit/libnetworking/netinet/tcp_input.c
+++ b/cpukit/libnetworking/netinet/tcp_input.c
@@ -52,6 +52,7 @@
 #include/* before tcp_seq.h, for tcp_random18() */
 
 #include 
+#include 
 #include 
 
 #include 
diff --git a/cpukit/libnetworking/rtems/rtems_showifstat.c 
b/cpukit/libnetworking/rtems/rtems_showifstat.c
index 7b53328..467bbab 100644
--- a/cpukit/libnetworking/rtems/rtems_showifstat.c
+++ b/cpukit/libnetworking/rtems/rtems_showifstat.c
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/rtems/rtems_showroute.c 
b/cpukit/libnetworking/rtems/rtems_showroute.c
index 44b4c3b..563887f 100644
--- a/cpukit/libnetworking/rtems/rtems_showroute.c
+++ b/cpukit/libnetworking/rtems/rtems_showroute.c
@@ -14,6 +14,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 28/29] libnetworking: Add missing include to if_var.h.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/rtems/rtems_syscall.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cpukit/libnetworking/rtems/rtems_syscall.c 
b/cpukit/libnetworking/rtems/rtems_syscall.c
index 6bef21a..ac976d4 100644
--- a/cpukit/libnetworking/rtems/rtems_syscall.c
+++ b/cpukit/libnetworking/rtems/rtems_syscall.c
@@ -26,6 +26,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 #include "rtems_syscall.h"
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 06/29] libnetworking: Add prototypes for ifafree, looutput.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/rtems/rtems_net_if.h | 8 
 1 file changed, 8 insertions(+)

diff --git a/cpukit/libnetworking/rtems/rtems_net_if.h 
b/cpukit/libnetworking/rtems/rtems_net_if.h
index 96b108e..49e9622 100644
--- a/cpukit/libnetworking/rtems/rtems_net_if.h
+++ b/cpukit/libnetworking/rtems/rtems_net_if.h
@@ -29,6 +29,9 @@ extern "C" {
 struct mbuf;
 struct ether_header;
 struct ifnet;
+struct sockaddr;
+struct rtentry;
+struct ifaddr;
 
 union  rtems_ifrequ {
struct ifreq ifreq;
@@ -42,6 +45,11 @@ unionrtems_ifrequ {
} rtems_ifrequ;
 };
 
+void   ifafree(struct ifaddr *);
+
+intlooutput(struct ifnet *,
+  struct mbuf *, struct sockaddr *, struct rtentry *);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 24/29] libnetworking: Add include of rtems_net_if.h for ifafree prototype.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/net/route.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cpukit/libnetworking/net/route.c b/cpukit/libnetworking/net/route.c
index b04649c..83147b6 100644
--- a/cpukit/libnetworking/net/route.c
+++ b/cpukit/libnetworking/net/route.c
@@ -48,6 +48,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 13/29] libnetworking: Add ip_fw_chk_t and ip_fw_ctl_t.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

Add the types and pointers for firewall.
---
 cpukit/libnetworking/netinet/ip_fw.c  | 1 +
 cpukit/libnetworking/netinet/ip_input.c   | 1 +
 cpukit/libnetworking/netinet/ip_output.c  | 1 +
 cpukit/libnetworking/netinet/raw_ip.c | 1 +
 cpukit/libnetworking/rtems/rtems_netinet_in.h | 8 
 5 files changed, 12 insertions(+)

diff --git a/cpukit/libnetworking/netinet/ip_fw.c 
b/cpukit/libnetworking/netinet/ip_fw.c
index 9063b39..ee62e47 100644
--- a/cpukit/libnetworking/netinet/ip_fw.c
+++ b/cpukit/libnetworking/netinet/ip_fw.c
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/netinet/ip_input.c 
b/cpukit/libnetworking/netinet/ip_input.c
index 74cc2cb..65eaa07 100644
--- a/cpukit/libnetworking/netinet/ip_input.c
+++ b/cpukit/libnetworking/netinet/ip_input.c
@@ -60,6 +60,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/netinet/ip_output.c 
b/cpukit/libnetworking/netinet/ip_output.c
index db81ccb..304a349 100644
--- a/cpukit/libnetworking/netinet/ip_output.c
+++ b/cpukit/libnetworking/netinet/ip_output.c
@@ -51,6 +51,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/netinet/raw_ip.c 
b/cpukit/libnetworking/netinet/raw_ip.c
index 746aed1..7647b8c 100644
--- a/cpukit/libnetworking/netinet/raw_ip.c
+++ b/cpukit/libnetworking/netinet/raw_ip.c
@@ -54,6 +54,7 @@
 
 #define _IP_VHL
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/rtems/rtems_netinet_in.h 
b/cpukit/libnetworking/rtems/rtems_netinet_in.h
index 3c716df..3940d92 100644
--- a/cpukit/libnetworking/rtems/rtems_netinet_in.h
+++ b/cpukit/libnetworking/rtems/rtems_netinet_in.h
@@ -16,6 +16,7 @@
 #define RTEMS_NETINET_IN_H
 
 #include 
+#include 
 
 #ifdef __cplusplus
 extern "C" {
@@ -34,6 +35,13 @@ extern "C" {
 
 int in_cksum(struct mbuf *, int);
 
+/* Firewall hooks */
+struct ip;
+typedefint ip_fw_chk_t(struct ip**, int, struct ifnet*, int, struct 
mbuf**);
+typedefint ip_fw_ctl_t(int, struct mbuf**);
+extern ip_fw_chk_t *ip_fw_chk_ptr;
+extern ip_fw_ctl_t *ip_fw_ctl_ptr;
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 21/29] libnetworking: Update gethostent_r API.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

Linux and FreeBSD use a common API now. Adapt the RTEMS one to provide
the same one.
---
 cpukit/libnetworking/libc/gethostbyht.c   | 52 ---
 cpukit/libnetworking/libc/gethostnamadr.c |  7 -
 2 files changed, 46 insertions(+), 13 deletions(-)

diff --git a/cpukit/libnetworking/libc/gethostbyht.c 
b/cpukit/libnetworking/libc/gethostbyht.c
index 2278e70..279514e 100644
--- a/cpukit/libnetworking/libc/gethostbyht.c
+++ b/cpukit/libnetworking/libc/gethostbyht.c
@@ -214,17 +214,36 @@ _gethostbyhtaddr(
 
 
 #ifdef _THREAD_SAFE
-struct hostent* gethostent_r(char* buf, int len) 
+int
+gethostent_r(
+   struct hostent *pe,
+   char *buf,
+   size_t len,
+   struct hostent **result,
+   int *h_errnop)
 {
   char  *dest;
-  struct hostent* pe=(struct hostent*)buf;
   char*  last;
   char*  max=buf+len;
   intaliasidx;
   intcurlen;
-  
-   
-  if (!hostf) return 0;
+  intrv;
+
+  if (pe == NULL || buf == NULL || result == NULL || h_errnop == NULL) {
+if (h_errnop != NULL) {
+  *h_errnop = NETDB_INTERNAL;
+}
+return EINVAL;
+  }
+
+  *result = NULL;
+  *h_errnop = NETDB_INTERNAL;
+  rv = -1;
+
+  if (!hostf) {
+rv = ENOENT;
+return rv;
+  }
   fseek(hostf,0,SEEK_END);
   curlen=ftell(hostf);
   fseek(hostf,0,SEEK_SET);
@@ -248,16 +267,22 @@ struct hostent* gethostent_r(char* buf, int len)
   last=hostmap+hostlen;
 again:
   if ((size_t)lenh_name=0;
   pe->h_aliases=(char**)dest; pe->h_aliases[0]=0; dest+=10*sizeof(char*);
   pe->h_addr_list=(char**)dest; dest+=2*sizeof(char**);
-  if (cur>=last) return 0;
+  if (cur>=last) {
+rv = ERANGE;
+return rv;
+  }
   if (*cur=='#' || *cur=='\n') goto parseerror;
   /* first, the ip number */
   pe->h_name=cur;
   while (cur=last) return 0;
+  if (cur>=last) {
+rv = ERANGE;
+return rv;
+  }
   if (*cur=='\n') goto parseerror;
   {
 char save=*cur;
@@ -301,19 +326,22 @@ again:
   pe->h_aliases[aliasidx]=0;
   pe->h_name=pe->h_aliases[0];
   pe->h_aliases++;
-  return pe;
+  *result = pe;
+  *h_errnop = 0;
+  rv = 0;
+  return rv;
 parseerror:
   while (curh_addrtype==AF_INET && !strcasecmp(r->h_name,name)) {  /* found 
it! */
 found:
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 27/29] libnetworking: Add include of rtems_net_if.h for looutput prototype.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/netinet/ip_output.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cpukit/libnetworking/netinet/ip_output.c 
b/cpukit/libnetworking/netinet/ip_output.c
index 304a349..003e7c3 100644
--- a/cpukit/libnetworking/netinet/ip_output.c
+++ b/cpukit/libnetworking/netinet/ip_output.c
@@ -48,6 +48,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 #include 
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 12/29] libnetworking: Add inttypes.h include for PRIu32, ...

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 c/src/libchip/network/dwmac.c   | 1 +
 c/src/libchip/network/i82586.c  | 1 +
 cpukit/libnetworking/netinet/ip_fw.c| 1 +
 cpukit/libnetworking/netinet/ip_input.c | 1 +
 4 files changed, 4 insertions(+)

diff --git a/c/src/libchip/network/dwmac.c b/c/src/libchip/network/dwmac.c
index b419081..30c0fc2 100644
--- a/c/src/libchip/network/dwmac.c
+++ b/c/src/libchip/network/dwmac.c
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/c/src/libchip/network/i82586.c b/c/src/libchip/network/i82586.c
index 39ba18f..7434550 100644
--- a/c/src/libchip/network/i82586.c
+++ b/c/src/libchip/network/i82586.c
@@ -155,6 +155,7 @@ Mode of operation:
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
diff --git a/cpukit/libnetworking/netinet/ip_fw.c 
b/cpukit/libnetworking/netinet/ip_fw.c
index 3ee8697..9063b39 100644
--- a/cpukit/libnetworking/netinet/ip_fw.c
+++ b/cpukit/libnetworking/netinet/ip_fw.c
@@ -49,6 +49,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static int fw_debug = 1;
 #ifdef IPFIREWALL_VERBOSE
diff --git a/cpukit/libnetworking/netinet/ip_input.c 
b/cpukit/libnetworking/netinet/ip_input.c
index 77b5045..74cc2cb 100644
--- a/cpukit/libnetworking/netinet/ip_input.c
+++ b/cpukit/libnetworking/netinet/ip_input.c
@@ -39,6 +39,7 @@
 #include "opt_ipfw.h"
 
 #include 
+#include 
 
 #include 
 #include 
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 18/29] libnetworking: Make struct ip known to rtems_glue.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/rtems/rtems_glue.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cpukit/libnetworking/rtems/rtems_glue.c 
b/cpukit/libnetworking/rtems/rtems_glue.c
index f079a67..e315679 100644
--- a/cpukit/libnetworking/rtems/rtems_glue.c
+++ b/cpukit/libnetworking/rtems/rtems_glue.c
@@ -833,6 +833,8 @@ rtems_bsdnet_log (int priority, const char *fmt, ...)
  * IP header checksum routine for processors which don't have an inline version
  */
 
+struct ip;
+
 u_int in_cksum_hdr(const struct ip *);
 
 u_int
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 14/29] libnetworking: Add ip_nat_... (IP NAT hooks.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/rtems/rtems_netinet_in.h | 8 
 1 file changed, 8 insertions(+)

diff --git a/cpukit/libnetworking/rtems/rtems_netinet_in.h 
b/cpukit/libnetworking/rtems/rtems_netinet_in.h
index 3940d92..477cd99 100644
--- a/cpukit/libnetworking/rtems/rtems_netinet_in.h
+++ b/cpukit/libnetworking/rtems/rtems_netinet_in.h
@@ -42,6 +42,14 @@ typedef  int ip_fw_ctl_t(int, struct mbuf**);
 extern ip_fw_chk_t *ip_fw_chk_ptr;
 extern ip_fw_ctl_t *ip_fw_ctl_ptr;
 
+/* IP NAT hooks */
+typedefint ip_nat_t(struct ip**, struct mbuf**, struct ifnet*, int);
+typedefint ip_nat_ctl_t(int, struct mbuf**);
+extern ip_nat_t *ip_nat_ptr;
+extern ip_nat_ctl_t *ip_nat_ctl_ptr;
+#defineIP_NAT_IN   0x0001
+#defineIP_NAT_OUT  0x0002
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 01/29] libnetwork: Remove network headers.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

They have been moved to newlib.
---
 cpukit/Makefile.am |   2 -
 cpukit/include/sys/_iovec.h|  58 -
 cpukit/include/sys/uio.h   | 124 --
 cpukit/libnetworking/Makefile.am   |  11 +-
 cpukit/libnetworking/arpa/inet.h   | 142 
 cpukit/libnetworking/net/if.h  | 303 
 cpukit/libnetworking/netdb.h   | 242 
 cpukit/libnetworking/netinet/in.h  | 458 -
 cpukit/libnetworking/netinet/tcp.h | 138 ---
 cpukit/libnetworking/preinstall.am |  36 ---
 cpukit/libnetworking/sys/socket.h  | 405 
 cpukit/libnetworking/sys/syslog.h  | 191 
 cpukit/libnetworking/sys/un.h  |  76 --
 cpukit/libnetworking/syslog.h  |   1 -
 cpukit/preinstall.am   |   8 -
 15 files changed, 1 insertion(+), 2194 deletions(-)
 delete mode 100644 cpukit/include/sys/_iovec.h
 delete mode 100644 cpukit/include/sys/uio.h
 delete mode 100644 cpukit/libnetworking/arpa/inet.h
 delete mode 100644 cpukit/libnetworking/net/if.h
 delete mode 100644 cpukit/libnetworking/netdb.h
 delete mode 100644 cpukit/libnetworking/netinet/in.h
 delete mode 100644 cpukit/libnetworking/netinet/tcp.h
 delete mode 100644 cpukit/libnetworking/sys/socket.h
 delete mode 100644 cpukit/libnetworking/sys/syslog.h
 delete mode 100644 cpukit/libnetworking/sys/un.h
 delete mode 100644 cpukit/libnetworking/syslog.h

diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index c84ccc3..bd18317 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -67,8 +67,6 @@ include_sys_HEADERS += libcsupport/include/sys/termios.h
 include_sys_HEADERS += libcsupport/include/sys/utsname.h
 
 include_sys_HEADERS += include/sys/endian.h
-include_sys_HEADERS += include/sys/uio.h
-include_sys_HEADERS += include/sys/_iovec.h
 include_sys_HEADERS += include/sys/priority.h
 
 if LIBNETWORKING
diff --git a/cpukit/include/sys/_iovec.h b/cpukit/include/sys/_iovec.h
deleted file mode 100644
index a6ca683..000
--- a/cpukit/include/sys/_iovec.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1993, 1994
- * 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.
- * 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.
- *
- * @(#)uio.h   8.5 (Berkeley) 2/22/94
- * $FreeBSD$
- */
-
-#ifndef _SYS__IOVEC_HH_
-#define_SYS__IOVEC_HH_
-
-#include 
-
-#ifndef _SIZE_T_DECLARED
-typedef__size_tsize_t;
-#define_SIZE_T_DECLARED
-#endif
-
-#ifdef __rtems__
-#ifndef __IOVEC_DEFINED
-#define __IOVEC_DEFINED
-struct iovec {
-   void*iov_base;  /* Base address. */
-   size_t   iov_len;   /* Length. */
-};
-#endif /* __IOVEC_DEFINED */
-#else
-struct iovec {
-   void*iov_base;  /* Base address. */
-   size_t   iov_len;   /* Length. */
-};
-#endif /* rtems */
-
-#endif /* !_SYS__IOVEC_HH_ */
diff --git a/cpukit/include/sys/uio.h b/cpukit/include/sys/uio.h
deleted file mode 100644
index 56956f0..000
--- a/cpukit/include/sys/uio.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1993, 1994
- * 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 conditio

[PATCH 09/29] libnetworking: Fix unknown type name 'tcp_cc'

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/Makefile.am   |  1 +
 cpukit/libnetworking/netinet/in_proto.c|  1 +
 cpukit/libnetworking/netinet/in_rmx.c  |  1 +
 cpukit/libnetworking/netinet/ip_fw.c   |  1 +
 cpukit/libnetworking/netinet/ip_icmp.c |  1 +
 cpukit/libnetworking/netinet/tcp_debug.c   |  1 +
 cpukit/libnetworking/netinet/tcp_input.c   |  1 +
 cpukit/libnetworking/netinet/tcp_output.c  |  1 +
 cpukit/libnetworking/netinet/tcp_subr.c|  1 +
 cpukit/libnetworking/netinet/tcp_timer.c   |  1 +
 cpukit/libnetworking/netinet/tcp_usrreq.c  |  1 +
 cpukit/libnetworking/preinstall.am |  4 
 cpukit/libnetworking/rtems/rtems_netinet_tcp.h | 31 ++
 cpukit/libnetworking/rtems/rtems_showtcpstat.c |  1 +
 14 files changed, 47 insertions(+)
 create mode 100644 cpukit/libnetworking/rtems/rtems_netinet_tcp.h

diff --git a/cpukit/libnetworking/Makefile.am b/cpukit/libnetworking/Makefile.am
index ef00f40..97784b8 100644
--- a/cpukit/libnetworking/Makefile.am
+++ b/cpukit/libnetworking/Makefile.am
@@ -146,6 +146,7 @@ include_rtems_HEADERS += rtems/rtems_mii_ioctl.h
 include_rtems_HEADERS += rtems/rtems_socket.h
 include_rtems_HEADERS += rtems/rtems_net_if.h
 include_rtems_HEADERS += rtems/rtems_netinet_in.h
+include_rtems_HEADERS += rtems/rtems_netinet_tcp.h
 
 libnetworking_a_SOURCES += rtems/sghostname.c \
 rtems/rtems_glue.c rtems/rtems_malloc_mbuf.c rtems/rtems_syscall.c \
diff --git a/cpukit/libnetworking/netinet/in_proto.c 
b/cpukit/libnetworking/netinet/in_proto.c
index 36c91f7..73faf11 100644
--- a/cpukit/libnetworking/netinet/in_proto.c
+++ b/cpukit/libnetworking/netinet/in_proto.c
@@ -57,6 +57,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/netinet/in_rmx.c 
b/cpukit/libnetworking/netinet/in_rmx.c
index ed45045..4f1df49 100644
--- a/cpukit/libnetworking/netinet/in_rmx.c
+++ b/cpukit/libnetworking/netinet/in_rmx.c
@@ -64,6 +64,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/netinet/ip_fw.c 
b/cpukit/libnetworking/netinet/ip_fw.c
index 6a891df..4b00596 100644
--- a/cpukit/libnetworking/netinet/ip_fw.c
+++ b/cpukit/libnetworking/netinet/ip_fw.c
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/netinet/ip_icmp.c 
b/cpukit/libnetworking/netinet/ip_icmp.c
index fd8f8da..2d5ec15 100644
--- a/cpukit/libnetworking/netinet/ip_icmp.c
+++ b/cpukit/libnetworking/netinet/ip_icmp.c
@@ -57,6 +57,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/netinet/tcp_debug.c 
b/cpukit/libnetworking/netinet/tcp_debug.c
index ca449bb..2d2d579 100644
--- a/cpukit/libnetworking/netinet/tcp_debug.c
+++ b/cpukit/libnetworking/netinet/tcp_debug.c
@@ -57,6 +57,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/netinet/tcp_input.c 
b/cpukit/libnetworking/netinet/tcp_input.c
index a01a3d6..de4981d 100644
--- a/cpukit/libnetworking/netinet/tcp_input.c
+++ b/cpukit/libnetworking/netinet/tcp_input.c
@@ -60,6 +60,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/netinet/tcp_output.c 
b/cpukit/libnetworking/netinet/tcp_output.c
index d23656f..bc09fdd 100644
--- a/cpukit/libnetworking/netinet/tcp_output.c
+++ b/cpukit/libnetworking/netinet/tcp_output.c
@@ -53,6 +53,7 @@
 #include 
 #include 
 #include 
+#include 
 #defineTCPOUTFLAGS
 #include 
 #include 
diff --git a/cpukit/libnetworking/netinet/tcp_subr.c 
b/cpukit/libnetworking/netinet/tcp_subr.c
index 75f6657..f31cd92 100644
--- a/cpukit/libnetworking/netinet/tcp_subr.c
+++ b/cpukit/libnetworking/netinet/tcp_subr.c
@@ -62,6 +62,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/netinet/tcp_timer.c 
b/cpukit/libnetworking/netinet/tcp_timer.c
index b27d2ee..1105147 100644
--- a/cpukit/libnetworking/netinet/tcp_timer.c
+++ b/cpukit/libnetworking/netinet/tcp_timer.c
@@ -59,6 +59,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/netinet/tcp_usrreq.c 
b/cpukit/libnetworking/netinet/tcp_usrreq.c
index 03ed9f0..5548c92 100644
--- a/cpukit/libnetworking/netinet/tcp_usrreq.c
+++ b/cpukit/libnetworking/netinet/tcp_usrreq.c
@@ -60,6 +60,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/preinstall.am 
b/cpukit/libnetworking/preinstall.am
index dcaa5d2..83ef2f8 100644
--- a/cpukit/libnetworking/preinstall.am
+++ b/cpukit/libnetworking/preinstall.am
@@ -298,6 +298,10 @@ $(PROJECT_INCLUDE)/rtems/rtems_netinet_in.h: 
rtems/rtems_netinet_in.h $(PROJECT_
$(INSTALL_DATA) $< $(PROJECT_INCLUD

[PATCH 02/29] libnetworking: Fix undefined sockwakeup and co.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libfs/src/nfsclient/src/rpcio.c|  1 +
 cpukit/libnetworking/Makefile.am  |  1 +
 cpukit/libnetworking/kern/uipc_socket.c   |  1 +
 cpukit/libnetworking/preinstall.am|  4 
 cpukit/libnetworking/rtems/rtems_socket.h | 28 
 5 files changed, 35 insertions(+)
 create mode 100644 cpukit/libnetworking/rtems/rtems_socket.h

diff --git a/cpukit/libfs/src/nfsclient/src/rpcio.c 
b/cpukit/libfs/src/nfsclient/src/rpcio.c
index 2848225..598f4c9 100644
--- a/cpukit/libfs/src/nfsclient/src/rpcio.c
+++ b/cpukit/libfs/src/nfsclient/src/rpcio.c
@@ -72,6 +72,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/Makefile.am b/cpukit/libnetworking/Makefile.am
index fa0cec2..659be45 100644
--- a/cpukit/libnetworking/Makefile.am
+++ b/cpukit/libnetworking/Makefile.am
@@ -143,6 +143,7 @@ include_rtems_HEADERS += rtems/tftp.h
 include_rtems_HEADERS += rtems/ftpfs.h
 include_rtems_HEADERS += rtems/mkrootfs.h
 include_rtems_HEADERS += rtems/rtems_mii_ioctl.h
+include_rtems_HEADERS += rtems/rtems_socket.h
 
 libnetworking_a_SOURCES += rtems/sghostname.c \
 rtems/rtems_glue.c rtems/rtems_malloc_mbuf.c rtems/rtems_syscall.c \
diff --git a/cpukit/libnetworking/kern/uipc_socket.c 
b/cpukit/libnetworking/kern/uipc_socket.c
index b221a37..0ec1972 100644
--- a/cpukit/libnetworking/kern/uipc_socket.c
+++ b/cpukit/libnetworking/kern/uipc_socket.c
@@ -45,6 +45,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static int somaxconn = SOMAXCONN;
 SYSCTL_INT(_kern, KIPC_SOMAXCONN, somaxconn, CTLFLAG_RW, &somaxconn, 0, "");
diff --git a/cpukit/libnetworking/preinstall.am 
b/cpukit/libnetworking/preinstall.am
index 18e4586..fb788e9 100644
--- a/cpukit/libnetworking/preinstall.am
+++ b/cpukit/libnetworking/preinstall.am
@@ -286,6 +286,10 @@ $(PROJECT_INCLUDE)/rtems/rtems_mii_ioctl.h: 
rtems/rtems_mii_ioctl.h $(PROJECT_IN
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems_mii_ioctl.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems_mii_ioctl.h
 
+$(PROJECT_INCLUDE)/rtems/rtems_socket.h: rtems/rtems_socket.h 
$(PROJECT_INCLUDE)/rtems/$(dirstamp)
+   $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems_socket.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems_socket.h
+
 $(PROJECT_INCLUDE)/sys/$(dirstamp):
@$(MKDIR_P) $(PROJECT_INCLUDE)/sys
@: > $(PROJECT_INCLUDE)/sys/$(dirstamp)
diff --git a/cpukit/libnetworking/rtems/rtems_socket.h 
b/cpukit/libnetworking/rtems/rtems_socket.h
new file mode 100644
index 000..27a3f2b
--- /dev/null
+++ b/cpukit/libnetworking/rtems/rtems_socket.h
@@ -0,0 +1,28 @@
+/**
+ * @file rtems/rtems_socket.h
+ */
+
+#ifndef RTEMS_SOCKET_H
+#define RTEMS_SOCKET_H
+
+#include 
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#defineSO_PRIVSTATE0x1009  /* get/deny privileged state */
+#define SO_SNDWAKEUP   0x1020  /* wakeup when ready to send */
+#define SO_RCVWAKEUP   0x1021  /* wakeup when ready to receive */
+
+struct socket;
+struct sockwakeup {
+   void(*sw_pfn)(struct socket *, void *);
+   void*sw_arg;
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* RTEMS_SOCKET_H */
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 07/29] libnetworking: Add prototype for in_cksum.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/Makefile.am  |  1 +
 cpukit/libnetworking/netinet/igmp.c   |  1 +
 cpukit/libnetworking/netinet/in.c |  1 +
 cpukit/libnetworking/netinet/in_cksum_sparc.h |  1 +
 cpukit/libnetworking/preinstall.am|  4 
 cpukit/libnetworking/rtems/rtems_netinet_in.h | 30 +++
 6 files changed, 38 insertions(+)
 create mode 100644 cpukit/libnetworking/rtems/rtems_netinet_in.h

diff --git a/cpukit/libnetworking/Makefile.am b/cpukit/libnetworking/Makefile.am
index cf14ef0..ef00f40 100644
--- a/cpukit/libnetworking/Makefile.am
+++ b/cpukit/libnetworking/Makefile.am
@@ -145,6 +145,7 @@ include_rtems_HEADERS += rtems/mkrootfs.h
 include_rtems_HEADERS += rtems/rtems_mii_ioctl.h
 include_rtems_HEADERS += rtems/rtems_socket.h
 include_rtems_HEADERS += rtems/rtems_net_if.h
+include_rtems_HEADERS += rtems/rtems_netinet_in.h
 
 libnetworking_a_SOURCES += rtems/sghostname.c \
 rtems/rtems_glue.c rtems/rtems_malloc_mbuf.c rtems/rtems_syscall.c \
diff --git a/cpukit/libnetworking/netinet/igmp.c 
b/cpukit/libnetworking/netinet/igmp.c
index 9372331..4ecd0ea 100644
--- a/cpukit/libnetworking/netinet/igmp.c
+++ b/cpukit/libnetworking/netinet/igmp.c
@@ -60,6 +60,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/netinet/in.c 
b/cpukit/libnetworking/netinet/in.c
index a23d4f5..2173418 100644
--- a/cpukit/libnetworking/netinet/in.c
+++ b/cpukit/libnetworking/netinet/in.c
@@ -46,6 +46,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 #include 
diff --git a/cpukit/libnetworking/netinet/in_cksum_sparc.h 
b/cpukit/libnetworking/netinet/in_cksum_sparc.h
index 5864b6a..b88ce92 100644
--- a/cpukit/libnetworking/netinet/in_cksum_sparc.h
+++ b/cpukit/libnetworking/netinet/in_cksum_sparc.h
@@ -82,6 +82,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/preinstall.am 
b/cpukit/libnetworking/preinstall.am
index a92eb67..dcaa5d2 100644
--- a/cpukit/libnetworking/preinstall.am
+++ b/cpukit/libnetworking/preinstall.am
@@ -294,6 +294,10 @@ $(PROJECT_INCLUDE)/rtems/rtems_net_if.h: 
rtems/rtems_net_if.h $(PROJECT_INCLUDE)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems_net_if.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems_net_if.h
 
+$(PROJECT_INCLUDE)/rtems/rtems_netinet_in.h: rtems/rtems_netinet_in.h 
$(PROJECT_INCLUDE)/rtems/$(dirstamp)
+   $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems_netinet_in.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems_netinet_in.h
+
 $(PROJECT_INCLUDE)/sys/$(dirstamp):
@$(MKDIR_P) $(PROJECT_INCLUDE)/sys
@: > $(PROJECT_INCLUDE)/sys/$(dirstamp)
diff --git a/cpukit/libnetworking/rtems/rtems_netinet_in.h 
b/cpukit/libnetworking/rtems/rtems_netinet_in.h
new file mode 100644
index 000..0f7b091
--- /dev/null
+++ b/cpukit/libnetworking/rtems/rtems_netinet_in.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2016 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Dornierstr. 4
+ *  82178 Puchheim
+ *  Germany
+ *  
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifndef RTEMS_NETINET_IN_H
+#define RTEMS_NETINET_IN_H
+
+#include 
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+int in_cksum(struct mbuf *, int);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* RTEMS_NETINET_IN_H */
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 15/29] libnetworking: Add IP_NAT option for get/setsockopt.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/rtems/rtems_netinet_in.h | 8 
 1 file changed, 8 insertions(+)

diff --git a/cpukit/libnetworking/rtems/rtems_netinet_in.h 
b/cpukit/libnetworking/rtems/rtems_netinet_in.h
index 477cd99..c2da532 100644
--- a/cpukit/libnetworking/rtems/rtems_netinet_in.h
+++ b/cpukit/libnetworking/rtems/rtems_netinet_in.h
@@ -50,6 +50,14 @@ extern   ip_nat_ctl_t *ip_nat_ctl_ptr;
 #defineIP_NAT_IN   0x0001
 #defineIP_NAT_OUT  0x0002
 
+/*
+ * Options for use with [gs]etsockopt at the IP level.
+ *
+ * The value is stored in an integer. Use negative numbers to avoid conflicts
+ * with BSD.
+ */
+#define IP_NAT (-55)   /* set/get NAT opts */
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 08/29] libnetworking: Add IPPORT_USERRESERVED.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/netinet/in_pcb.c | 1 +
 cpukit/libnetworking/rtems/rtems_netinet_in.h | 6 ++
 2 files changed, 7 insertions(+)

diff --git a/cpukit/libnetworking/netinet/in_pcb.c 
b/cpukit/libnetworking/netinet/in_pcb.c
index c41e634..1cd9c92 100644
--- a/cpukit/libnetworking/netinet/in_pcb.c
+++ b/cpukit/libnetworking/netinet/in_pcb.c
@@ -54,6 +54,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/rtems/rtems_netinet_in.h 
b/cpukit/libnetworking/rtems/rtems_netinet_in.h
index 0f7b091..b3aebdc 100644
--- a/cpukit/libnetworking/rtems/rtems_netinet_in.h
+++ b/cpukit/libnetworking/rtems/rtems_netinet_in.h
@@ -21,6 +21,12 @@
 extern "C" {
 #endif /* __cplusplus */
 
+/*
+ * Ports > IPPORT_USERRESERVED are reserved
+ * for servers, not necessarily privileged.  (IP_PORTRANGE_DEFAULT)
+ */
+#defineIPPORT_USERRESERVED 5000
+
 int in_cksum(struct mbuf *, int);
 
 #ifdef __cplusplus
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 26/29] libnetworking: satosin is now provided by in.h.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/netinet/in_rmx.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/cpukit/libnetworking/netinet/in_rmx.c 
b/cpukit/libnetworking/netinet/in_rmx.c
index 6effa7c..c386044 100644
--- a/cpukit/libnetworking/netinet/in_rmx.c
+++ b/cpukit/libnetworking/netinet/in_rmx.c
@@ -115,11 +115,9 @@ in_addroute(void *v_arg, void *n_arg, struct 
radix_node_head *head,
if (in_broadcast(sin->sin_addr, rt->rt_ifp)) {
rt->rt_flags |= RTF_BROADCAST;
} else {
-#define satosin(sa) ((struct sockaddr_in *)sa)
if (satosin(rt->rt_ifa->ifa_addr)->sin_addr.s_addr
== sin->sin_addr.s_addr)
rt->rt_flags |= RTF_LOCAL;
-#undef satosin
}
}
 
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Draft for moving network headers from RTEMS to newlib

2016-04-25 Thread Christian Mauderer
Hello,

currently we try to remove the network specific POSIX headers from
RTEMS. Instead, we add current headers from FreeBSD to newlib. This will
simplify the build process of some libraries that depend on the network
(like LibreSSL). Further it will be another step into the direction of
extracting the old RTEMS network stack and build it as an independent
package.

This patch-set is a first draft for the changes that would be necessary
on the RTEMS side. It still needs some cleanup. On the newlib side, we
would have to add the headers.

Some of the patches move defines or prototypes from the old network
headers into RTEMS specific rtems/rtems_XXX.h files. For example patch
11 moves three of the IPCTL_RTxxx that have been deprecated and removed
in the current FreeBSD netinet/in.h file into a RTEMS specific
rtems/rtems_netinet_in.h.

Do you think it would make more sense to collect these RTEMS-specific
extensions all into rtems_bsdnet.h instead of adding one file per
replaced header?

Kind Regards

Christian Mauderer


-- 

embedded brains GmbH
Christian Mauderer
Dornierstr. 4
D-82178 Puchheim
Germany
email: christian.maude...@embedded-brains.de
Phone: +49-89-18 94 741 - 18
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH 03/29] libnetworking: Fix ifr_tap.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/Makefile.am  |  1 +
 cpukit/libnetworking/net/if.c |  5 ++--
 cpukit/libnetworking/preinstall.am|  4 +++
 cpukit/libnetworking/rtems/rtems_net_if.h | 49 +++
 4 files changed, 57 insertions(+), 2 deletions(-)
 create mode 100644 cpukit/libnetworking/rtems/rtems_net_if.h

diff --git a/cpukit/libnetworking/Makefile.am b/cpukit/libnetworking/Makefile.am
index 659be45..cf14ef0 100644
--- a/cpukit/libnetworking/Makefile.am
+++ b/cpukit/libnetworking/Makefile.am
@@ -144,6 +144,7 @@ include_rtems_HEADERS += rtems/ftpfs.h
 include_rtems_HEADERS += rtems/mkrootfs.h
 include_rtems_HEADERS += rtems/rtems_mii_ioctl.h
 include_rtems_HEADERS += rtems/rtems_socket.h
+include_rtems_HEADERS += rtems/rtems_net_if.h
 
 libnetworking_a_SOURCES += rtems/sghostname.c \
 rtems/rtems_glue.c rtems/rtems_malloc_mbuf.c rtems/rtems_syscall.c \
diff --git a/cpukit/libnetworking/net/if.c b/cpukit/libnetworking/net/if.c
index d0da62a..1c4823a 100644
--- a/cpukit/libnetworking/net/if.c
+++ b/cpukit/libnetworking/net/if.c
@@ -50,6 +50,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -660,11 +661,11 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, 
struct proc *p)
 * RTEMS additions for setting/getting `tap' function
 */
case SIOCSIFTAP:
-   ifp->if_tap = ifr->ifr_tap;
+   ifp->if_tap = ((struct rtems_ifreq *)ifr)->ifr_tap;
return 0;
 
case SIOCGIFTAP:
-   ifr->ifr_tap = ifp->if_tap;
+   ((struct rtems_ifreq *)ifr)->ifr_tap = ifp->if_tap;
return 0;
}
return (0);
diff --git a/cpukit/libnetworking/preinstall.am 
b/cpukit/libnetworking/preinstall.am
index fb788e9..a92eb67 100644
--- a/cpukit/libnetworking/preinstall.am
+++ b/cpukit/libnetworking/preinstall.am
@@ -290,6 +290,10 @@ $(PROJECT_INCLUDE)/rtems/rtems_socket.h: 
rtems/rtems_socket.h $(PROJECT_INCLUDE)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems_socket.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems_socket.h
 
+$(PROJECT_INCLUDE)/rtems/rtems_net_if.h: rtems/rtems_net_if.h 
$(PROJECT_INCLUDE)/rtems/$(dirstamp)
+   $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems_net_if.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems_net_if.h
+
 $(PROJECT_INCLUDE)/sys/$(dirstamp):
@$(MKDIR_P) $(PROJECT_INCLUDE)/sys
@: > $(PROJECT_INCLUDE)/sys/$(dirstamp)
diff --git a/cpukit/libnetworking/rtems/rtems_net_if.h 
b/cpukit/libnetworking/rtems/rtems_net_if.h
new file mode 100644
index 000..96b108e
--- /dev/null
+++ b/cpukit/libnetworking/rtems/rtems_net_if.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2016 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Dornierstr. 4
+ *  82178 Puchheim
+ *  Germany
+ *  
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifndef RTEMS_NET_H
+#define RTEMS_NET_H
+
+#include 
+#include 
+#include 
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*
+ * Forward structure declarations for function prototypes.
+ */
+struct mbuf;
+struct ether_header;
+struct ifnet;
+
+union  rtems_ifrequ {
+   struct ifreq ifreq;
+   struct rtems_ifreq {
+   charifr_name[IFNAMSIZ];
+   union {
+   int (*ifru_tap)(struct ifnet *,
+   struct ether_header *, struct mbuf *);
+   } ifr_ifru;
+#defineifr_tap ifr_ifru.ifru_tap   /* tap function */
+   } rtems_ifrequ;
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* RTEMS_NET_H */
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 16/29] libnetworking: Add TCP CC options.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/rtems/rtems_netinet_tcp.h | 8 
 1 file changed, 8 insertions(+)

diff --git a/cpukit/libnetworking/rtems/rtems_netinet_tcp.h 
b/cpukit/libnetworking/rtems/rtems_netinet_tcp.h
index fe509af..b92a5ca 100644
--- a/cpukit/libnetworking/rtems/rtems_netinet_tcp.h
+++ b/cpukit/libnetworking/rtems/rtems_netinet_tcp.h
@@ -24,6 +24,14 @@ extern "C" {
 
 typedef u_long tcp_cc; /* connection count per rfc1644 */
 
+#defineTCPOPT_CC   11  /* CC options: RFC-1644 
*/
+#defineTCPOPT_CCNEW12
+#defineTCPOPT_CCECHO   13
+#defineTCPOLEN_CC  6
+#defineTCPOLEN_CC_APPA (TCPOLEN_CC+2)
+#defineTCPOPT_CC_HDR(ccopt)\
+(TCPOPT_NOP<<24|TCPOPT_NOP<<16|(ccopt)<<8|TCPOLEN_CC)
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 22/29] libnetworking: Match gethostbyname_r with prototype.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/libc/gethostnamadr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cpukit/libnetworking/libc/gethostnamadr.c 
b/cpukit/libnetworking/libc/gethostnamadr.c
index a718820..cf0a12d 100644
--- a/cpukit/libnetworking/libc/gethostnamadr.c
+++ b/cpukit/libnetworking/libc/gethostnamadr.c
@@ -371,7 +371,7 @@ nodata:
 int gethostbyname_r(const char*  name, 
 struct hostent*  result,
 char*buf, 
-int  buflen,
+size_t   buflen,
 struct hostent **RESULT, 
 int *h_errnop) 
 {
@@ -414,13 +414,13 @@ int gethostbyname_r(const char*  name,
 
   {
 struct hostent* r;
-struct hostent* he_buf = buf;
+struct hostent* he_buf = (struct hostent *)buf;
 char *work_buf = buf + sizeof(struct hostent);
 size_t remain_len = buflen - sizeof(struct hostent);
 int he_errno;
 
 sethostent(0);
-while (gethostent_r(he_buf, buf, remain_len, &r, &he_errno) == 0) {
+while (gethostent_r(he_buf, work_buf, remain_len, &r, &he_errno) == 0) {
   int i;
   if (r->h_addrtype==AF_INET && !strcasecmp(r->h_name,name)) {  /* found 
it! */
 found:
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 29/29] libnetworking: Include rtems_netdb.h for _map_v4v6... prototypes.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/libc/map_v4v6.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cpukit/libnetworking/libc/map_v4v6.c 
b/cpukit/libnetworking/libc/map_v4v6.c
index 0b13285..66287d4 100644
--- a/cpukit/libnetworking/libc/map_v4v6.c
+++ b/cpukit/libnetworking/libc/map_v4v6.c
@@ -67,6 +67,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 25/29] libnetworking: Add *__h_errno() instead of h_errno.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/libc/gethostbydns.c | 1 -
 cpukit/libnetworking/libc/getnetbydns.c  | 2 --
 cpukit/libnetworking/libc/herror.c   | 8 +++-
 cpukit/libnetworking/resolv.h| 9 -
 4 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/cpukit/libnetworking/libc/gethostbydns.c 
b/cpukit/libnetworking/libc/gethostbydns.c
index ba7291f..7300ef4 100644
--- a/cpukit/libnetworking/libc/gethostbydns.c
+++ b/cpukit/libnetworking/libc/gethostbydns.c
@@ -118,7 +118,6 @@ typedef union {
 char ac;
 } align;
 
-extern int h_errno;
 int _dns_ttl_;
 
 #ifdef DEBUG
diff --git a/cpukit/libnetworking/libc/getnetbydns.c 
b/cpukit/libnetworking/libc/getnetbydns.c
index a92fba6..adbd0c9 100644
--- a/cpukit/libnetworking/libc/getnetbydns.c
+++ b/cpukit/libnetworking/libc/getnetbydns.c
@@ -80,8 +80,6 @@
 
 #include "res_config.h"
 
-extern int h_errno;
-
 #define BYADDR 0
 #define BYNAME 1
 #defineMAXALIASES  35
diff --git a/cpukit/libnetworking/libc/herror.c 
b/cpukit/libnetworking/libc/herror.c
index e7d6ba4..bb1112f 100644
--- a/cpukit/libnetworking/libc/herror.c
+++ b/cpukit/libnetworking/libc/herror.c
@@ -67,7 +67,13 @@ const char *h_errlist[] = {
 };
 inth_nerr = { sizeof h_errlist / sizeof h_errlist[0] };
 
-inth_errno;
+int *
+__h_errno(void)
+{
+   static int the_h_errno;
+
+   return &the_h_errno;
+}
 
 #define HERROR_USE_WRITEV
 
diff --git a/cpukit/libnetworking/resolv.h b/cpukit/libnetworking/resolv.h
index 6c87a00..06d3a55 100644
--- a/cpukit/libnetworking/resolv.h
+++ b/cpukit/libnetworking/resolv.h
@@ -69,15 +69,6 @@
 #define__RES   19960801
 
 /*%
- * This used to be defined in res_query.c, now it's in herror.c.  It was
- * never extern'd by any *.h file before it was placed here.  herror.c is
- * part of libresolv.a even though it might make more sense in libnetdb.a
- * or even libnet.a.
- */
-
-extern int h_errno;
-
-/*%
  * Resolver configuration file.
  * Normally not present, but may contain the address of the
  * initial name server(s) to query and the domain search list.
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 20/29] libnetworking: Add _getXbyYname/addr and _set/endXYent functions.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/Makefile.am  |  1 +
 cpukit/libnetworking/libc/gethostbydns.c  |  1 +
 cpukit/libnetworking/libc/gethostbyht.c   |  1 +
 cpukit/libnetworking/libc/gethostbynis.c  |  1 +
 cpukit/libnetworking/libc/gethostnamadr.c |  1 +
 cpukit/libnetworking/libc/getnetbydns.c   |  1 +
 cpukit/libnetworking/libc/getnetbyht.c|  1 +
 cpukit/libnetworking/libc/getnetbynis.c   |  1 +
 cpukit/libnetworking/libc/getnetnamadr.c  |  1 +
 cpukit/libnetworking/preinstall.am|  4 +++
 cpukit/libnetworking/rtems/rtems_netdb.h  | 53 +++
 11 files changed, 66 insertions(+)
 create mode 100644 cpukit/libnetworking/rtems/rtems_netdb.h

diff --git a/cpukit/libnetworking/Makefile.am b/cpukit/libnetworking/Makefile.am
index 97784b8..ada77fd 100644
--- a/cpukit/libnetworking/Makefile.am
+++ b/cpukit/libnetworking/Makefile.am
@@ -147,6 +147,7 @@ include_rtems_HEADERS += rtems/rtems_socket.h
 include_rtems_HEADERS += rtems/rtems_net_if.h
 include_rtems_HEADERS += rtems/rtems_netinet_in.h
 include_rtems_HEADERS += rtems/rtems_netinet_tcp.h
+include_rtems_HEADERS += rtems/rtems_netdb.h
 
 libnetworking_a_SOURCES += rtems/sghostname.c \
 rtems/rtems_glue.c rtems/rtems_malloc_mbuf.c rtems/rtems_syscall.c \
diff --git a/cpukit/libnetworking/libc/gethostbydns.c 
b/cpukit/libnetworking/libc/gethostbydns.c
index 68af27d..ba7291f 100644
--- a/cpukit/libnetworking/libc/gethostbydns.c
+++ b/cpukit/libnetworking/libc/gethostbydns.c
@@ -73,6 +73,7 @@
 #include 
 #endif
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/libc/gethostbyht.c 
b/cpukit/libnetworking/libc/gethostbyht.c
index 17723d7..2278e70 100644
--- a/cpukit/libnetworking/libc/gethostbyht.c
+++ b/cpukit/libnetworking/libc/gethostbyht.c
@@ -60,6 +60,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include  /* realloc, malloc, free */
 #include 
diff --git a/cpukit/libnetworking/libc/gethostbynis.c 
b/cpukit/libnetworking/libc/gethostbynis.c
index 1ae2e49..3a4195c 100644
--- a/cpukit/libnetworking/libc/gethostbynis.c
+++ b/cpukit/libnetworking/libc/gethostbynis.c
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/libc/gethostnamadr.c 
b/cpukit/libnetworking/libc/gethostnamadr.c
index d627cfb..ccf2f96 100644
--- a/cpukit/libnetworking/libc/gethostnamadr.c
+++ b/cpukit/libnetworking/libc/gethostnamadr.c
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/libc/getnetbydns.c 
b/cpukit/libnetworking/libc/getnetbydns.c
index 33ff993..a92fba6 100644
--- a/cpukit/libnetworking/libc/getnetbydns.c
+++ b/cpukit/libnetworking/libc/getnetbydns.c
@@ -70,6 +70,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/libc/getnetbyht.c 
b/cpukit/libnetworking/libc/getnetbyht.c
index dbe2d68..4a388c7 100644
--- a/cpukit/libnetworking/libc/getnetbyht.c
+++ b/cpukit/libnetworking/libc/getnetbyht.c
@@ -51,6 +51,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #ifdef HAVE_STRINGS_H
diff --git a/cpukit/libnetworking/libc/getnetbynis.c 
b/cpukit/libnetworking/libc/getnetbynis.c
index 3849a67..14f09bc 100644
--- a/cpukit/libnetworking/libc/getnetbynis.c
+++ b/cpukit/libnetworking/libc/getnetbynis.c
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/libc/getnetnamadr.c 
b/cpukit/libnetworking/libc/getnetnamadr.c
index eb98477..7cb1b1b 100644
--- a/cpukit/libnetworking/libc/getnetnamadr.c
+++ b/cpukit/libnetworking/libc/getnetnamadr.c
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cpukit/libnetworking/preinstall.am 
b/cpukit/libnetworking/preinstall.am
index 83ef2f8..3f03062 100644
--- a/cpukit/libnetworking/preinstall.am
+++ b/cpukit/libnetworking/preinstall.am
@@ -302,6 +302,10 @@ $(PROJECT_INCLUDE)/rtems/rtems_netinet_tcp.h: 
rtems/rtems_netinet_tcp.h $(PROJEC
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems_netinet_tcp.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems_netinet_tcp.h
 
+$(PROJECT_INCLUDE)/rtems/rtems_netdb.h: rtems/rtems_netdb.h 
$(PROJECT_INCLUDE)/rtems/$(dirstamp)
+   $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems_netdb.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems_netdb.h
+
 $(PROJECT_INCLUDE)/sys/$(dirstamp):
@$(MKDIR_P) $(PROJECT_INCLUDE)/sys
@: > $(PROJECT_INCLUDE)/sys/$(dirstamp)
diff --git a/cpukit/libnetworking/rtems/rtems_netdb.h 
b/cpukit/libnetworking/rtems/rtems_netdb.h
new file mode 100644
index 000..30887ef
--- /dev/null
+++ b/cpukit/libnetworking/rtems/rtems_netdb.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2016 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Dornierstr. 4
+ *  82178 Puchheim
+ *  Ger

[PATCH 23/29] civetweb: Fix return value when NO_TIMEGM is set.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/mghttpd/civetweb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/mghttpd/civetweb.c b/cpukit/mghttpd/civetweb.c
index 520a6b6..5d4da3d 100644
--- a/cpukit/mghttpd/civetweb.c
+++ b/cpukit/mghttpd/civetweb.c
@@ -7092,7 +7092,7 @@ is_not_modified(const struct mg_connection *conn, const 
struct file *filep)
return (inm != NULL && !mg_strcasecmp(etag, inm))
   || (ims != NULL && (filep->last_modified <= 
parse_date_string(ims)));
 #else /* NO_TIMEGM */
-   return false;
+   return 0;
 #endif /* !NO_TIMEGM */
 }
 
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 11/29] libnetworking: Add deprecated IPCTL_RTxxx defines.'

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/netinet/in_rmx.c | 1 +
 cpukit/libnetworking/rtems/rtems_netinet_in.h | 5 +
 2 files changed, 6 insertions(+)

diff --git a/cpukit/libnetworking/netinet/in_rmx.c 
b/cpukit/libnetworking/netinet/in_rmx.c
index 4f1df49..6effa7c 100644
--- a/cpukit/libnetworking/netinet/in_rmx.c
+++ b/cpukit/libnetworking/netinet/in_rmx.c
@@ -57,6 +57,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
diff --git a/cpukit/libnetworking/rtems/rtems_netinet_in.h 
b/cpukit/libnetworking/rtems/rtems_netinet_in.h
index b3aebdc..3c716df 100644
--- a/cpukit/libnetworking/rtems/rtems_netinet_in.h
+++ b/cpukit/libnetworking/rtems/rtems_netinet_in.h
@@ -27,6 +27,11 @@ extern "C" {
  */
 #defineIPPORT_USERRESERVED 5000
 
+/* Deprecated in current FreeBSD */
+#define IPCTL_RTEXPIRE 5   /* cloned route expiration time */
+#define IPCTL_RTMINEXPIRE  6   /* min value for expiration time */
+#define IPCTL_RTMAXCACHE   7   /* trigger level for dynamic expire */
+
 int in_cksum(struct mbuf *, int);
 
 #ifdef __cplusplus
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 19/29] libnetworking: Move in_cksum to rtems_bsdnet_inernal.h

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/rtems/rtems_bsdnet_internal.h | 3 +++
 cpukit/libnetworking/rtems/rtems_netinet_in.h  | 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h 
b/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h
index 7ede2c6..efb0ae5 100644
--- a/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h
+++ b/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h
@@ -232,6 +232,9 @@ void rtems_set_tcp_buffer_sizes(u_long, u_long);
 
 void rtems_set_sb_efficiency(u_long);
 
+struct mbuf;
+int in_cksum(struct mbuf *, int);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/cpukit/libnetworking/rtems/rtems_netinet_in.h 
b/cpukit/libnetworking/rtems/rtems_netinet_in.h
index c2da532..27d3a82 100644
--- a/cpukit/libnetworking/rtems/rtems_netinet_in.h
+++ b/cpukit/libnetworking/rtems/rtems_netinet_in.h
@@ -33,8 +33,6 @@ extern "C" {
 #define IPCTL_RTMINEXPIRE  6   /* min value for expiration time */
 #define IPCTL_RTMAXCACHE   7   /* trigger level for dynamic expire */
 
-int in_cksum(struct mbuf *, int);
-
 /* Firewall hooks */
 struct ip;
 typedefint ip_fw_chk_t(struct ip**, int, struct ifnet*, int, struct 
mbuf**);
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 17/29] libnetworking: Add TCPOPT_TSTAMP_HDR.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

---
 cpukit/libnetworking/rtems/rtems_netinet_tcp.h | 5 +
 1 file changed, 5 insertions(+)

diff --git a/cpukit/libnetworking/rtems/rtems_netinet_tcp.h 
b/cpukit/libnetworking/rtems/rtems_netinet_tcp.h
index b92a5ca..f4a1b2a 100644
--- a/cpukit/libnetworking/rtems/rtems_netinet_tcp.h
+++ b/cpukit/libnetworking/rtems/rtems_netinet_tcp.h
@@ -24,6 +24,11 @@ extern "C" {
 
 typedef u_long tcp_cc; /* connection count per rfc1644 */
 
+#defineTCPOPT_TSTAMP_HDR   \
+(uint32_t)(((uint32_t)TCPOPT_NOP<<24)| \
+   ((uint32_t)TCPOPT_NOP<<16)| \
+   ((uint32_t)TCPOPT_TIMESTAMP<<8)| \
+   ((uint32_t)TCPOLEN_TIMESTAMP))
 #defineTCPOPT_CC   11  /* CC options: RFC-1644 
*/
 #defineTCPOPT_CCNEW12
 #defineTCPOPT_CCECHO   13
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 05/29] libnetworking: Add net/if_var.h to net/if_arp.h.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

The net/if_var.h has previously included in net/if.h.
---
 cpukit/libnetworking/net/if_arp.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cpukit/libnetworking/net/if_arp.h 
b/cpukit/libnetworking/net/if_arp.h
index 7654678..cbd8fae 100644
--- a/cpukit/libnetworking/net/if_arp.h
+++ b/cpukit/libnetworking/net/if_arp.h
@@ -35,6 +35,7 @@
 #define_NET_IF_ARP_H_
 
 #include  /* struct sockaddr */
+#include  /* struct ifnet */
 
 /*
  * Address Resolution Protocol.
-- 
1.8.4.5

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 04/29] libnetworking: Replace IFF_RUNNING and IFF_OACTIVE.

2016-04-25 Thread Christian Mauderer
From: Christian Mauderer 

These two defines are replaced by IFF_DRV_RUNNING and IFF_DRV_OACTIVE.
---
 c/src/lib/libbsp/arm/atsam/network/if_atsam.c  | 14 -
 c/src/lib/libbsp/arm/csb336/network/network.c  | 14 -
 c/src/lib/libbsp/arm/csb337/network/network.c  | 14 -
 c/src/lib/libbsp/arm/gumstix/rtl8019/rtl8019.c | 20 ++---
 .../libbsp/arm/shared/lpc/network/lpc-ethernet.c   |  6 ++--
 c/src/lib/libbsp/i386/pc386/3c509/3c509.c  | 26 -
 c/src/lib/libbsp/i386/pc386/ne2000/ne2000.c| 20 ++---
 c/src/lib/libbsp/i386/pc386/wd8003/wd8003.c| 14 -
 .../lm32/shared/milkymist_networking/network.c | 14 -
 c/src/lib/libbsp/lm32/shared/tsmac/tsmac.c | 14 -
 c/src/lib/libbsp/m68k/av5282/network/network.c | 14 -
 c/src/lib/libbsp/m68k/csb360/network/network.c | 14 -
 c/src/lib/libbsp/m68k/gen68360/network/network.c   | 14 -
 c/src/lib/libbsp/m68k/genmcf548x/network/network.c | 14 -
 c/src/lib/libbsp/m68k/mcf5235/network/network.c| 14 -
 c/src/lib/libbsp/m68k/mcf5329/network/network.c| 14 -
 c/src/lib/libbsp/m68k/mvme167/network/network.c| 16 +-
 c/src/lib/libbsp/m68k/uC5282/network/network.c | 14 -
 c/src/lib/libbsp/mips/csb350/network/network.c | 14 -
 .../libbsp/powerpc/beatnik/network/if_em/if_em.c   | 34 +++---
 .../libbsp/powerpc/beatnik/network/if_gfe/if_gfe.c | 28 +-
 .../powerpc/beatnik/network/if_mve/mv643xx_eth.c   | 28 +-
 .../libbsp/powerpc/gen5200/network_5200/network.c  | 14 -
 .../lib/libbsp/powerpc/haleakala/network/network.c | 18 ++--
 .../libbsp/powerpc/mpc55xxevb/network/smsc9218i.c  |  6 ++--
 .../powerpc/mpc8260ads/network/if_hdlcsubr.c   |  4 +--
 .../libbsp/powerpc/mpc8260ads/network/network.c| 14 -
 c/src/lib/libbsp/powerpc/mvme3100/network/tsec.c   | 26 -
 .../mvme5500/network/if_100MHz/GT64260eth.c| 22 +++---
 .../powerpc/mvme5500/network/if_1GHz/if_wm.c   | 16 +-
 c/src/lib/libbsp/powerpc/psim/network/if_sim.c | 10 +++
 .../lib/libbsp/powerpc/qoriq/network/if_intercom.c |  6 ++--
 .../libbsp/powerpc/tqm8xx/network/network_fec.c| 14 -
 .../libbsp/powerpc/tqm8xx/network/network_scc.c| 14 -
 c/src/lib/libbsp/powerpc/virtex/network/xiltemac.c | 24 +++
 c/src/lib/libbsp/sparc/shared/net/greth.c  | 20 ++---
 c/src/lib/libcpu/bfin/network/ethernet.c   | 16 +-
 c/src/lib/libcpu/powerpc/mpc83xx/network/tsec.c|  8 ++---
 c/src/libchip/network/cs8900.c | 12 
 c/src/libchip/network/dec21140.c   | 14 -
 c/src/libchip/network/dwmac.c  |  8 ++---
 c/src/libchip/network/elnk.c   | 16 +-
 c/src/libchip/network/greth.c  | 20 ++---
 c/src/libchip/network/i82586.c | 14 -
 c/src/libchip/network/if_dc.c  | 22 +++---
 c/src/libchip/network/if_fxp.c |  8 ++---
 c/src/libchip/network/open_eth.c   | 14 -
 c/src/libchip/network/smc9.c   | 16 +-
 c/src/libchip/network/sonic.c  | 14 -
 cpukit/libnetworking/net/if_ethersubr.c|  6 ++--
 cpukit/libnetworking/net/if_loop.c |  3 +-
 cpukit/libnetworking/net/if_ppp.c  | 14 -
 cpukit/libnetworking/net/ppp_tty.c |  2 +-
 cpukit/libnetworking/rtems/rtems_dhcp_failsafe.c   |  6 ++--
 cpukit/libnetworking/rtems/rtems_showifstat.c  |  4 +--
 doc/networking/driver.t| 12 
 56 files changed, 407 insertions(+), 404 deletions(-)

diff --git a/c/src/lib/libbsp/arm/atsam/network/if_atsam.c 
b/c/src/lib/libbsp/arm/atsam/network/if_atsam.c
index c738ee3..d548c1f 100644
--- a/c/src/lib/libbsp/arm/atsam/network/if_atsam.c
+++ b/c/src/lib/libbsp/arm/atsam/network/if_atsam.c
@@ -819,7 +819,7 @@ static void if_atsam_tx_daemon(void *arg)
_ARM_Data_synchronization_barrier();
GMAC_TransmissionStart(pHw);
}
-   ifp->if_flags &= ~IFF_OACTIVE;
+   ifp->if_flags &= ~IFF_DRV_OACTIVE;
}
 }
 
@@ -833,7 +833,7 @@ static void if_atsam_enet_start(struct ifnet *ifp)
 
TRACE_DEBUG(" in start\n\r");
 
-   ifp->if_flags |= IFF_OACTIVE;
+   ifp->if_flags |= IFF_DRV_OACTIVE;
rtems_bsdnet_event_send(sc->tx_daemon_tid,
ATSAMV7_ETH_START_TRANSMIT_EVENT);
 }
@@ -901,10 +901,10 @@ static void if_atsam_init(void *arg)
struct ifnet *ifp = &sc->arpcom.ac_if;
uint32_t dmac_cfg = 0;
 
-   if (sc->arpcom.ac_if.if_flags & IFF_RUNNING) {
+   if (sc->arpcom.ac_if.if_

Re: [PATCH 00/13] Replace mongoose with civetweb.

2016-04-25 Thread Joel Sherrill
On Mon, Apr 25, 2016 at 4:22 AM, Christian Mauderer <
christian.maude...@embedded-brains.de> wrote:

> Essentially I agree that it would be nice to build civetweb as an
> external library especially with the different network stacks in mind.
> But there are some points that keep me from doing it:
>
> 1. I have really no Idea what would be necessary to build it as an
> upstream project using RSB. If that are only something like three simple
> steps, it should be possible to squeeze it in the little time budget
> that is left for the project. If I first have to analyze and change a
> lot of RSB, it would be challenging.
>
> FWIW I think this can be a secondary goal. Switching over to the real
upstream project with proper licensing is important.

When we do this, we incur some burden of "retraining" users to consider
a webserver an external addon. But that is the direction I think we want
to head with httpd, telnetd, ftpd, etc. So it is a good long term goal.


> Chris, I think you know the RSB best: What steps do you think would be
> necessary?
>
>
Chris...


> 2. Currently there is one test case for mghttpd (libtests/mghttpd01).
> This is one of the few tests that check some networking functions in
> RTEMS. Further we should not loose the ability to test software when it
> is build with RSB. How would we handle tests for software in RSB?
>
>
That's a Chris question. We should aim to have tests which run with
either network stack for RSB built network services. This is a good
requirement on the plan to moving to separately built network stacks
and services.

Having thought about this, I am not opposed to seeing the patches
merged as long as it is clear what is just moving to the new upstream,
what are patches, the patches are submitted upstream and we push
to get them merged.

I realize you need a practical goal. I would like concurrence from Chris
and Gedare on the short and long term plans. If you can make any
progress on the long term plan, that's good but we should accept
the short term needed improvement.

Perfection is the enemy of the good enough.


> Kind regards
>
> Christian Mauderer
>
> Am 23.04.2016 um 15:07 schrieb Joel Sherrill:
> > I am really with Gedare and Chris that it would be better to treat this
> > as an upstream project. Use the RSB and track patches through RTEMS
> tools.
> >
> > It would be a good case to push the model of a single network service
> > supporting both stacks and begin the process of removing networking code
> > from the base RTEMS git repo.
> >
> > It would also push us to figure out how to rest RSB built packages.
> >
> > On Apr 22, 2016 12:05 AM, "Christian Mauderer"
> >  > > wrote:
> >
> > Yes that's right. 05/13 just adds the unchanged sources from
> civetweb.
> > Beneath civetweb.c and civetweb.h it also adds handle_form.inl and
> > md5.inl. The last two files are included into civetweb.c. According
> to
> > the documentation "The *INL* file extension represents code that is
> > statically included inline in a source file."
> >
> > And yes: The patch didn't get through. I have got a replay that "Your
> > message to devel awaits moderator approval". The civetweb.c file is
> over
> > 300k and the mailing list seems to have a maximum of 256k. I hoped
> that
> > one of the mail admins would approve the patch soon.
> >
> > Am 21.04.2016 um 22:49 schrieb Gedare Bloom:
> > > I think patch 05/13 probably adds civetweb.c and civetweb.h? But it
> > > did not come through the mailman.
> > >
> > > On Thu, Apr 21, 2016 at 4:46 PM, Gedare Bloom  > > wrote:
> > >> P.S. might be worth it to open a ticket related to civetweb and
> > >> #update it from these patches.
> > >>
> > >> On Thu, Apr 21, 2016 at 4:45 PM, Gedare Bloom  > > wrote:
> > >>> Is the plan eventually to be able to use the upstream civetweb?
> > or to
> > >>> track it with our own copy?
> > >>>
> > >>> On Thu, Apr 21, 2016 at 4:49 AM, Christian Mauderer
> > >>>  > > wrote:
> >  This patch series replaces the mongoose webserver by its still
> MIT
> >  licensed fork civetweb.
> > 
> >  Please note that I try to get some (currently two) of the
> patches
> >  directly into civetweb too. But I think that it might need some
> > time and
> >  adaption till they are accepted. So I thought that adding them
> > to RTEMS
> >  would still make sense as a working interim solution.
> > 
> >  ___
> >  devel mailing list
> >  devel@rtems.org 
> >  http://lists.rtems.org/mailman/listinfo/devel
> >
> > --
> > 
> > embedded brains GmbH
> > Christian Mauderer

start trying to build rtems with kbuild

2016-04-25 Thread printk
hi, a11:
I am trying to build rtems with kbuild on linux.
just a hobby, make rtems easier to build on linux.
not support freebsd, windows...
(I guess some company don't use windows or linux,
securty is critical for them. for small companies,
e.g. shenzhen small companies, convenien is more
important.)
but this may make it hard to ship a bsp in lib.
anyway, just for fun. :D
for more infomation about kbuild building and config,
there maybe some video on youtube: compile linux kernel.

repo: (push later)
http://github.com/zhang3/rtems-kbuild

here is some build log:
- - - -
rtems@book:~/rtems-kbuild$ make
  CC  c/src/lib/libcpu/arm/s3c24xx/clock/clockdrv.o
  CC  c/src/lib/libcpu/arm/s3c24xx/clock/support.o
  LD  c/src/lib/libcpu/arm/s3c24xx/clock/built-in.o
  CC  c/src/lib/libcpu/arm/s3c24xx/irq/irq.o
  LD  c/src/lib/libcpu/arm/s3c24xx/irq/built-in.o
  CC  c/src/lib/libcpu/arm/s3c24xx/timer/timer.o
  LD  c/src/lib/libcpu/arm/s3c24xx/timer/built-in.o
  LD  c/src/lib/libcpu/arm/s3c24xx/built-in.o
  LINKvmlinux
  LD  vmlinux.o
arm-rtems-ld: cannot find arch/arm/kernel/head.o: No such file or directory
c/src/lib/libcpu/arm/s3c24xx/: file not recognized: Is a directory
Makefile:970: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1

- - - -

rtems@book:~/rtems-kbuild$ make V=1
make -f ./scripts/Makefile.build obj=c/src/lib/libcpu/arm/s3c24xx
make -f ./scripts/Makefile.build obj=c/src/lib/libcpu/arm/s3c24xx/clock
  arm-rtems-gcc -Wp,-MD,c/src/lib/libcpu/arm/s3c24xx/clock/.clockdrv.o.d  
-Ic/src/lib/libcpu/arm/s3c24xx/include -Ic/src/lib/libcpu/arm/include 
-Ic/src/lib/libcpu/arm/shared/include -Icpukit/score/include 
-Icpukit/dev/include -Icpukit/include -Icpukit/score/cpu/arm -Ibsp-include 
-DHAVE_CONFIG_H -DCPU_S3C2410 -D__rtems__ -mlittle-endian 
-Ic/src/lib/libcpu/arm/s3c24xx/include -fno-dwarf2-cfi-asm -fno-ipa-sra -marm 
-D__LINUX_ARM_ARCH__=5 -march=armv5te -mtune=arm9tdmi -msoft-float -Uarm 
-fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 
-fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer 
-fno-var-tracking-assignments -Wdeclaration-after-statement -Wno-pointer-sign 
-fno-strict-overflow -fconserve-stack -Werror=implicit-int 
-Werror=strict-prototypes -Werror=date-time -DCPU_S3C2410 -specs 
./c/src/lib/libbsp/arm/smdk2410/bsp_specs-D"KBUILD_STR(s)=#s" 
-D"KBUILD_BASENAME=KBUILD_STR(clockdrv)"  
-D"KBUILD_MODNAME=KBUILD_STR(clockdrv)" -c -o c/src/lib/lib
 cpu/arm/s3c24xx/clock/clockdrv.o c/src/lib/libcpu/arm/s3c24xx/clock/clockdrv.c
  arm-rtems-gcc -Wp,-MD,c/src/lib/libcpu/arm/s3c24xx/clock/.support.o.d  
-Ic/src/lib/libcpu/arm/s3c24xx/include -Ic/src/lib/libcpu/arm/include 
-Ic/src/lib/libcpu/arm/shared/include -Icpukit/score/include 
-Icpukit/dev/include -Icpukit/include -Icpukit/score/cpu/arm -Ibsp-include 
-DHAVE_CONFIG_H -DCPU_S3C2410 -D__rtems__ -mlittle-endian 
-Ic/src/lib/libcpu/arm/s3c24xx/include -fno-dwarf2-cfi-asm -fno-ipa-sra -marm 
-D__LINUX_ARM_ARCH__=5 -march=armv5te -mtune=arm9tdmi -msoft-float -Uarm 
-fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 
-fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer 
-fno-var-tracking-assignments -Wdeclaration-after-statement -Wno-pointer-sign 
-fno-strict-overflow -fconserve-stack -Werror=implicit-int 
-Werror=strict-prototypes -Werror=date-time -DCPU_S3C2410 -specs 
./c/src/lib/libbsp/arm/smdk2410/bsp_specs-D"KBUILD_STR(s)=#s" 
-D"KBUILD_BASENAME=KBUILD_STR(support)"  -D"KBUILD_MODNAME=KBUILD_STR(support)" 
-c -o c/src/lib/libcpu
 /arm/s3c24xx/clock/support.o c/src/lib/libcpu/arm/s3c24xx/clock/support.c
   arm-rtems-ld -EL-r -o c/src/lib/libcpu/arm/s3c24xx/clock/built-in.o 
c/src/lib/libcpu/arm/s3c24xx/clock/clockdrv.o 
c/src/lib/libcpu/arm/s3c24xx/clock/support.o
(cat /dev/null; ) > c/src/lib/libcpu/arm/s3c24xx/clock/modules.order
make -f ./scripts/Makefile.build obj=c/src/lib/libcpu/arm/s3c24xx/irq
  arm-rtems-gcc -Wp,-MD,c/src/lib/libcpu/arm/s3c24xx/irq/.irq.o.d  
-Ic/src/lib/libcpu/arm/s3c24xx/include -Ic/src/lib/libcpu/arm/include 
-Ic/src/lib/libcpu/arm/shared/include -Icpukit/score/include 
-Icpukit/dev/include -Icpukit/include -Icpukit/score/cpu/arm -Ibsp-include 
-DHAVE_CONFIG_H -DCPU_S3C2410 -D__rtems__ -mlittle-endian 
-Ic/src/lib/libcpu/arm/s3c24xx/include -fno-dwarf2-cfi-asm -fno-ipa-sra -marm 
-D__LINUX_ARM_ARCH__=5 -march=armv5te -mtune=arm9tdmi -msoft-float -Uarm 
-fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 
-fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer 
-fno-var-tracking-assignments -Wdeclaration-after-statement -Wno-pointer-sign 
-fno-strict-overflow -fconserve-stack -Werror=implicit-int 
-Werror=strict-prototypes -Werror=date-time -DCPU_S3C2410 -specs 
./c/src/lib/libbsp/arm/smdk2410/bsp_specs-D"KBUILD_STR(s)=#s" 
-D"KBUILD_BASENAME=KBUILD_STR(irq)"  -D"KBUILD_MODNAME=KBUILD_STR(irq)" -c -o 
c/src/lib/libcpu/arm/s3c24xx/i
 rq/irq.o c/src/l

Re: [PATCH 00/13] Replace mongoose with civetweb.

2016-04-25 Thread Gedare Bloom
On Mon, Apr 25, 2016 at 11:25 AM, Joel Sherrill  wrote:
>
>
> On Mon, Apr 25, 2016 at 4:22 AM, Christian Mauderer
>  wrote:
>>
>> Essentially I agree that it would be nice to build civetweb as an
>> external library especially with the different network stacks in mind.
>> But there are some points that keep me from doing it:
>>
>> 1. I have really no Idea what would be necessary to build it as an
>> upstream project using RSB. If that are only something like three simple
>> steps, it should be possible to squeeze it in the little time budget
>> that is left for the project. If I first have to analyze and change a
>> lot of RSB, it would be challenging.
>>
> FWIW I think this can be a secondary goal. Switching over to the real
> upstream project with proper licensing is important.
>
> When we do this, we incur some burden of "retraining" users to consider
> a webserver an external addon. But that is the direction I think we want
> to head with httpd, telnetd, ftpd, etc. So it is a good long term goal.
>
>>
>> Chris, I think you know the RSB best: What steps do you think would be
>> necessary?
>>
>
> Chris...
>
>>
>> 2. Currently there is one test case for mghttpd (libtests/mghttpd01).
>> This is one of the few tests that check some networking functions in
>> RTEMS. Further we should not loose the ability to test software when it
>> is build with RSB. How would we handle tests for software in RSB?
>>
>
> That's a Chris question. We should aim to have tests which run with
> either network stack for RSB built network services. This is a good
> requirement on the plan to moving to separately built network stacks
> and services.
>
> Having thought about this, I am not opposed to seeing the patches
> merged as long as it is clear what is just moving to the new upstream,
> what are patches, the patches are submitted upstream and we push
> to get them merged.
>
> I realize you need a practical goal. I would like concurrence from Chris
> and Gedare on the short and long term plans. If you can make any
> progress on the long term plan, that's good but we should accept
> the short term needed improvement.
>
> Perfection is the enemy of the good enough.
>
We need to watch out for incurring (new) technical debt. This patch
set does not add new debt, but it does expose some that we had not
thought about yet. I would certainly encourage spending some of your
budget to consider the difficulty to provide the web server as a 3rd
party package build, and to open a ticket to track such an idea. Since
we now have examples of other 3rd party packages (e.g. graphics tool
kit), I would expect that a web server should not be too hard. Plus,
you get the advantage of not tying the civetweb build to the in-tree
net stack.

>>
>> Kind regards
>>
>> Christian Mauderer
>>
>> Am 23.04.2016 um 15:07 schrieb Joel Sherrill:
>> > I am really with Gedare and Chris that it would be better to treat this
>> > as an upstream project. Use the RSB and track patches through RTEMS
>> > tools.
>> >
>> > It would be a good case to push the model of a single network service
>> > supporting both stacks and begin the process of removing networking code
>> > from the base RTEMS git repo.
>> >
>> > It would also push us to figure out how to rest RSB built packages.
>> >
>> > On Apr 22, 2016 12:05 AM, "Christian Mauderer"
>> > > > > wrote:
>> >
>> > Yes that's right. 05/13 just adds the unchanged sources from
>> > civetweb.
>> > Beneath civetweb.c and civetweb.h it also adds handle_form.inl and
>> > md5.inl. The last two files are included into civetweb.c. According
>> > to
>> > the documentation "The *INL* file extension represents code that is
>> > statically included inline in a source file."
>> >
>> > And yes: The patch didn't get through. I have got a replay that
>> > "Your
>> > message to devel awaits moderator approval". The civetweb.c file is
>> > over
>> > 300k and the mailing list seems to have a maximum of 256k. I hoped
>> > that
>> > one of the mail admins would approve the patch soon.
>> >
>> > Am 21.04.2016 um 22:49 schrieb Gedare Bloom:
>> > > I think patch 05/13 probably adds civetweb.c and civetweb.h? But
>> > it
>> > > did not come through the mailman.
>> > >
>> > > On Thu, Apr 21, 2016 at 4:46 PM, Gedare Bloom > > > wrote:
>> > >> P.S. might be worth it to open a ticket related to civetweb and
>> > >> #update it from these patches.
>> > >>
>> > >> On Thu, Apr 21, 2016 at 4:45 PM, Gedare Bloom > > > wrote:
>> > >>> Is the plan eventually to be able to use the upstream civetweb?
>> > or to
>> > >>> track it with our own copy?
>> > >>>
>> > >>> On Thu, Apr 21, 2016 at 4:49 AM, Christian Mauderer
>> > >>> > > > wrote:
>> >  This patch series replaces the mongoose webserver by its still
>> > 

Re: [PATCH 00/13] Replace mongoose with civetweb.

2016-04-25 Thread Joel Sherrill
Agreed 100%!

NTP has an RSB recipe and there are others for various libraries which
should be good examples. Shouldn't take long to do the recipe. Just ask
questions rather than getting stuck.
On Apr 25, 2016 7:03 PM, "Gedare Bloom"  wrote:

> On Mon, Apr 25, 2016 at 11:25 AM, Joel Sherrill  wrote:
> >
> >
> > On Mon, Apr 25, 2016 at 4:22 AM, Christian Mauderer
> >  wrote:
> >>
> >> Essentially I agree that it would be nice to build civetweb as an
> >> external library especially with the different network stacks in mind.
> >> But there are some points that keep me from doing it:
> >>
> >> 1. I have really no Idea what would be necessary to build it as an
> >> upstream project using RSB. If that are only something like three simple
> >> steps, it should be possible to squeeze it in the little time budget
> >> that is left for the project. If I first have to analyze and change a
> >> lot of RSB, it would be challenging.
> >>
> > FWIW I think this can be a secondary goal. Switching over to the real
> > upstream project with proper licensing is important.
> >
> > When we do this, we incur some burden of "retraining" users to consider
> > a webserver an external addon. But that is the direction I think we want
> > to head with httpd, telnetd, ftpd, etc. So it is a good long term goal.
> >
> >>
> >> Chris, I think you know the RSB best: What steps do you think would be
> >> necessary?
> >>
> >
> > Chris...
> >
> >>
> >> 2. Currently there is one test case for mghttpd (libtests/mghttpd01).
> >> This is one of the few tests that check some networking functions in
> >> RTEMS. Further we should not loose the ability to test software when it
> >> is build with RSB. How would we handle tests for software in RSB?
> >>
> >
> > That's a Chris question. We should aim to have tests which run with
> > either network stack for RSB built network services. This is a good
> > requirement on the plan to moving to separately built network stacks
> > and services.
> >
> > Having thought about this, I am not opposed to seeing the patches
> > merged as long as it is clear what is just moving to the new upstream,
> > what are patches, the patches are submitted upstream and we push
> > to get them merged.
> >
> > I realize you need a practical goal. I would like concurrence from Chris
> > and Gedare on the short and long term plans. If you can make any
> > progress on the long term plan, that's good but we should accept
> > the short term needed improvement.
> >
> > Perfection is the enemy of the good enough.
> >
> We need to watch out for incurring (new) technical debt. This patch
> set does not add new debt, but it does expose some that we had not
> thought about yet. I would certainly encourage spending some of your
> budget to consider the difficulty to provide the web server as a 3rd
> party package build, and to open a ticket to track such an idea. Since
> we now have examples of other 3rd party packages (e.g. graphics tool
> kit), I would expect that a web server should not be too hard. Plus,
> you get the advantage of not tying the civetweb build to the in-tree
> net stack.
>
> >>
> >> Kind regards
> >>
> >> Christian Mauderer
> >>
> >> Am 23.04.2016 um 15:07 schrieb Joel Sherrill:
> >> > I am really with Gedare and Chris that it would be better to treat
> this
> >> > as an upstream project. Use the RSB and track patches through RTEMS
> >> > tools.
> >> >
> >> > It would be a good case to push the model of a single network service
> >> > supporting both stacks and begin the process of removing networking
> code
> >> > from the base RTEMS git repo.
> >> >
> >> > It would also push us to figure out how to rest RSB built packages.
> >> >
> >> > On Apr 22, 2016 12:05 AM, "Christian Mauderer"
> >> >  >> > > wrote:
> >> >
> >> > Yes that's right. 05/13 just adds the unchanged sources from
> >> > civetweb.
> >> > Beneath civetweb.c and civetweb.h it also adds handle_form.inl and
> >> > md5.inl. The last two files are included into civetweb.c.
> According
> >> > to
> >> > the documentation "The *INL* file extension represents code that
> is
> >> > statically included inline in a source file."
> >> >
> >> > And yes: The patch didn't get through. I have got a replay that
> >> > "Your
> >> > message to devel awaits moderator approval". The civetweb.c file
> is
> >> > over
> >> > 300k and the mailing list seems to have a maximum of 256k. I hoped
> >> > that
> >> > one of the mail admins would approve the patch soon.
> >> >
> >> > Am 21.04.2016 um 22:49 schrieb Gedare Bloom:
> >> > > I think patch 05/13 probably adds civetweb.c and civetweb.h? But
> >> > it
> >> > > did not come through the mailman.
> >> > >
> >> > > On Thu, Apr 21, 2016 at 4:46 PM, Gedare Bloom  >> > > wrote:
> >> > >> P.S. might be worth it to open a ticket related to civetweb and
> >> > >> #update it from these patches.
> >> > 

Re: [PATCH 00/13] Replace mongoose with civetweb.

2016-04-25 Thread Chris Johns

On 26/04/2016 07:22, Joel Sherrill wrote:

Agreed 100%!

NTP has an RSB recipe and there are others for various libraries which
should be good examples. Shouldn't take long to do the recipe. Just ask
questions rather than getting stuck.

On Apr 25, 2016 7:03 PM, "Gedare Bloom" mailto:ged...@rtems.org>> wrote:

On Mon, Apr 25, 2016 at 11:25 AM, Joel Sherrill mailto:j...@rtems.org>> wrote:
 >
 >
 > On Mon, Apr 25, 2016 at 4:22 AM, Christian Mauderer
 > mailto:christian.maude...@embedded-brains.de>> wrote:
 >>
 >> Essentially I agree that it would be nice to build civetweb as an
 >> external library especially with the different network stacks in
mind.
 >> But there are some points that keep me from doing it:
 >>
 >> 1. I have really no Idea what would be necessary to build it as an
 >> upstream project using RSB. If that are only something like
three simple
 >> steps, it should be possible to squeeze it in the little time budget
 >> that is left for the project. If I first have to analyze and
change a
 >> lot of RSB, it would be challenging.
 >>
 > FWIW I think this can be a secondary goal. Switching over to the real
 > upstream project with proper licensing is important.


I see both as equally important and once the switch is made we have an 
on going liability in the project to keep the packaging maintained so 
considering it a bit more I suppose the long term issue is actually more 
important to me.



 >
 > When we do this, we incur some burden of "retraining" users to
consider
 > a webserver an external addon. But that is the direction I think
we want
 > to head with httpd, telnetd, ftpd, etc. So it is a good long term
goal.


Agreed.


 >
 >>
 >> Chris, I think you know the RSB best: What steps do you think
would be
 >> necessary?
 >>
 >
 > Chris...
 >


There are a number of examples that show how to do this. Ping me if you 
need specific help. Gedare has highlighted NTP and there is also NetNSMP.



 >>
 >> 2. Currently there is one test case for mghttpd
(libtests/mghttpd01).
 >> This is one of the few tests that check some networking functions in
 >> RTEMS.


I would be concerned if the only way we can do network testing is to 
consume a 3prd party package's source into RTEMS. :)



Further we should not loose the ability to test software
when it
 >> is build with RSB.


I agree.


How would we handle tests for software in RSB?
 >>
 >
 > That's a Chris question. We should aim to have tests which run with
 > either network stack for RSB built network services. This is a good
 > requirement on the plan to moving to separately built network stacks
 > and services.


Network testing is an open topic as is vertically integrated packages. 
The testing issues exists with libbsd, lwip and the in-tree stack once 
we move out of the source tree. As we flesh out the details of 
vertically integrating packages we need to figure out now to manage testing.


What tests does civetweb provide? If the test is important I would 
assume it is important to all users. Can civetweb build the test?



 >
 > Having thought about this, I am not opposed to seeing the patches
 > merged as long as it is clear what is just moving to the new
upstream,
 > what are patches, the patches are submitted upstream and we push
 > to get them merged.
 >
 > I realize you need a practical goal. I would like concurrence
from Chris
 > and Gedare on the short and long term plans. If you can make any
 > progress on the long term plan, that's good but we should accept
 > the short term needed improvement.
 >
 > Perfection is the enemy of the good enough.
 >
We need to watch out for incurring (new) technical debt. This patch
set does not add new debt, but it does expose some that we had not
thought about yet. I would certainly encourage spending some of your
budget to consider the difficulty to provide the web server as a 3rd
party package build, and to open a ticket to track such an idea.


Adding the patch set lowers the threshold to bringing further updates in 
and that makes the change to a separate package appear a higher cost and 
less likely to happen.


We have the httpd code in the RTEMS source tree and in libbsd and we 
have a project in GSoC to add lwip. Do we add another copy into lwip to 
make sure we have equivalent functionality across the stacks and that is 
not even considering network testing? I hope we do not another copy.



Since
we now have examples of other 3rd party packages (e.g. graphics tool
kit), I would expect that a web server should not be too hard. Plus,
you get the advantage of not tying the civetweb build to the in-tree
net stack.


I agree.

Chris



 >>
 >> Kind regards
 >>
 >> Christian Mauderer
 >

Re: Draft for moving network headers from RTEMS to newlib

2016-04-25 Thread Chris Johns

On 26/04/2016 01:06, Christian Mauderer wrote:

currently we try to remove the network specific POSIX headers from
RTEMS. Instead, we add current headers from FreeBSD to newlib. This will
simplify the build process of some libraries that depend on the network
(like LibreSSL).


What does this work flow offer over building and installing an RTEMS 
kernel for a BSP and adding that path to the packages include paths?


How do you get the flags for the compiler to build the package?

How are any tests present in the package built and linked?

Do we risk limited the functionality of a package by restricting the 
headers exposed to only standards based headers? There are headers which 
some packages use that will not be present.



Further it will be another step into the direction of
extracting the old RTEMS network stack and build it as an independent
package.


Is this just a specialised version of the generic vertical integration 
problem being discussed in the civetweb thread?


I am not against standards based headers like the ones being discussed 
here being move to newlib however I currently do not see what the 
advantage is and how value is being adding over a specific build order 
of packages.


I still see all the normal issues of CFLAGS, LDFLAGS, 3rd party package 
dependence still being present once this work is completed.


Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel