This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 9f4ae0d5358431f6dc6695503e9d68e09c3d3eda
Author: Marco Casaroli <[email protected]>
AuthorDate: Tue Oct 27 21:46:41 2026 +0100

    include/netinet: Add in_systm.h.
    
    <netinet/in_systm.h> gives n_short, n_long and n_time, the types of
    4.4BSD for the fields of the IP headers in network byte order.  glibc,
    musl and the BSDs have it, and network programs include it with
    <netinet/ip.h> (tcp-wrappers' fix_options.c did not compile without it).
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 include/netinet/in_systm.h | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/include/netinet/in_systm.h b/include/netinet/in_systm.h
new file mode 100644
index 00000000000..45de339b1eb
--- /dev/null
+++ b/include/netinet/in_systm.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ * include/netinet/in_systm.h
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+#ifndef __INCLUDE_NETINET_IN_SYSTM_H
+#define __INCLUDE_NETINET_IN_SYSTM_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <stdint.h>
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+/* The types of 4.4BSD <netinet/in_systm.h> for the fields of the IP
+ * headers, in network byte order.  glibc, musl and the BSDs have them.
+ */
+
+typedef uint16_t n_short;  /* A short as received from the network */
+typedef uint32_t n_long;   /* A long as received from the network */
+typedef uint32_t n_time;   /* Milliseconds since 00:00 UTC, byte order of
+                            * the network */
+
+#endif /* __INCLUDE_NETINET_IN_SYSTM_H */

Reply via email to