All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Packham <judge.packham@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH v2 01/11] Initial net6.h
Date: Mon,  9 Nov 2015 20:38:46 +1300	[thread overview]
Message-ID: <1447054736-27658-2-git-send-email-judge.packham@gmail.com> (raw)
In-Reply-To: <1447054736-27658-1-git-send-email-judge.packham@gmail.com>

The initial net6.h just has the definition of an IPv6 address and IPv6
header. Subsequent changes will build on this.

Signed-off-by: Chris Packham <judge.packham@gmail.com>

---

Changes in v2: None

 include/net6.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 include/net6.h

diff --git a/include/net6.h b/include/net6.h
new file mode 100644
index 0000000..b622951
--- /dev/null
+++ b/include/net6.h
@@ -0,0 +1,48 @@
+/**
+ * Simple IPv6 network layer implementation.
+ *
+ * Based and/or adapted from the IPv4 network layer in net.[hc]
+ *
+ * (C) Copyright 2013 Allied Telesis Labs NZ
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+#ifndef __NET6_H__
+#define __NET6_H__
+
+struct in6_addr {
+	union {
+		__u8	u6_addr8[16];
+		__be16	u6_addr16[8];
+		__be32	u6_addr32[4];
+	} in6_u;
+
+#define s6_addr		in6_u.u6_addr8
+#define s6_addr16	in6_u.u6_addr16
+#define s6_addr32	in6_u.u6_addr32
+};
+
+/**
+ * struct ipv6hdr - Internet Protocol V6 (IPv6) header.
+ *
+ * IPv6 packet header as defined in RFC 2460.
+ */
+struct ip6_hdr {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+	__u8    priority:4,
+		version:4;
+#elif defined(__BIG_ENDIAN_BITFIELD)
+	__u8    version:4,
+		priority:4;
+#else
+#error  "Please fix <asm/byteorder.h>"
+#endif
+	__u8		flow_lbl[3];
+	__be16		payload_len;
+	__u8		nexthdr;
+	__u8		hop_limit;
+	struct in6_addr	saddr;
+	struct in6_addr	daddr;
+};
+
+#endif /* __NET6_H__ */
-- 
2.5.3

  reply	other threads:[~2015-11-09  7:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09  7:38 [U-Boot] [RFC PATCH v2 00/11] IPv6 support Chris Packham
2015-11-09  7:38 ` Chris Packham [this message]
2015-11-24  1:05   ` [U-Boot] [RFC PATCH v2 01/11] Initial net6.h Joe Hershberger
2015-11-09  7:38 ` [U-Boot] [RFC PATCH v2 02/11] lib: vsprintf: add IPv6 compressed format %pI6c Chris Packham
2015-11-24  1:06   ` Joe Hershberger
2015-11-09  7:38 ` [U-Boot] [RFC PATCH v2 03/11] lib: net_utils: make string_to_ip stricter Chris Packham
2015-11-24  1:06   ` Joe Hershberger
2015-11-24  9:37     ` Chris Packham
2015-11-09  7:38 ` [U-Boot] [RFC PATCH v2 04/11] lib: net_utils: add string_to_ip6 Chris Packham
2015-11-24  1:06   ` Joe Hershberger
2015-11-09  7:38 ` [U-Boot] [RFC PATCH v2 05/11] net: add definition of udp_hdr Chris Packham
2015-11-24  1:06   ` Joe Hershberger
2015-11-09  7:38 ` [U-Boot] [RFC PATCH v2 06/11] net: IPv6 skeleton and environment variables Chris Packham
2015-11-24  1:06   ` Joe Hershberger
2015-11-24  9:47     ` Chris Packham
2015-11-09  7:38 ` [U-Boot] [RFC PATCH v2 07/11] net: IPv6 support Chris Packham
2015-11-24  1:06   ` Joe Hershberger
2015-11-09  7:38 ` [U-Boot] [RFC PATCH v2 08/11] net: Add ping6 command and implementation Chris Packham
2015-11-24  1:06   ` Joe Hershberger
2015-11-09  7:38 ` [U-Boot] [RFC PATCH v2 09/11] net: TFTP over IPv6 Chris Packham
2015-11-24  1:07   ` Joe Hershberger
2015-11-09  7:38 ` [U-Boot] [RFC PATCH v2 10/11] net: IPv6 documentation Chris Packham
2015-11-09  7:38 ` [U-Boot] [RFC PATCH v2 11/11] net: e1000 enable multicast reception Chris Packham
2015-11-24  1:07   ` Joe Hershberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447054736-27658-2-git-send-email-judge.packham@gmail.com \
    --to=judge.packham@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.