From b30752a32364a11946432a0c50ee920fba512019 Mon Sep 17 00:00:00 2001 From: yangyanjun Date: Fri, 30 Sep 2022 10:13:47 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E8=A6=86=E7=9B=96=E7=8E=87=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=BC=98=E5=8C=96=EF=BC=8C=E5=88=A0=E9=99=A4=E5=BA=9F?= =?UTF-8?q?=E5=BC=83=E4=BB=A3=E7=A0=81=E5=92=8C=E5=88=86=E6=94=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangyanjun --- .../linux/include/net/ninet_connection_sock.h | 2 - code/linux/include/net/nip.h | 25 ++------- code/linux/include/net/transp_nip.h | 7 --- code/linux/net/newip/Makefile | 2 +- code/linux/net/newip/af_ninet.c | 14 ++--- code/linux/net/newip/datagram.c | 26 --------- code/linux/net/newip/icmp.c | 8 --- code/linux/net/newip/ninet_connection_sock.c | 12 ----- code/linux/net/newip/nip_addrconf.c | 53 ------------------- code/linux/net/newip/nip_addrconf_core.c | 7 +-- code/linux/net/newip/tcp_nip_output.c | 37 ------------- code/linux/net/newip/udp.c | 16 ------ 12 files changed, 14 insertions(+), 195 deletions(-) delete mode 100644 code/linux/net/newip/datagram.c diff --git a/code/linux/include/net/ninet_connection_sock.h b/code/linux/include/net/ninet_connection_sock.h index 1c13485..31dc606 100644 --- a/code/linux/include/net/ninet_connection_sock.h +++ b/code/linux/include/net/ninet_connection_sock.h @@ -20,8 +20,6 @@ struct sk_buff; struct sock; struct sockaddr; -int ninet_csk_bind_conflict(const struct sock *sk, - const struct inet_bind_bucket *tb, bool relax); int ninet_csk_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl); void ninet_csk_reqsk_queue_hash_add(struct sock *sk, struct request_sock *req, unsigned long timeout); diff --git a/code/linux/include/net/nip.h b/code/linux/include/net/nip.h index ecc1469..b51ce6f 100644 --- a/code/linux/include/net/nip.h +++ b/code/linux/include/net/nip.h @@ -47,14 +47,6 @@ struct ninet_protocol { #define NIPCB(skb) ((struct ninet_skb_parm *)&(TCP_SKB_CB(skb)->header.hnip)) extern const struct ninet_protocol __rcu *ninet_protos[MAX_INET_PROTOS]; - -int ninet_add_protocol(const struct ninet_protocol *prot, - unsigned char protocol); -int ninet_del_protocol(const struct ninet_protocol *prot, - unsigned char protocol); -int ninet_register_protosw(struct inet_protosw *p); -void ninet_unregister_protosw(struct inet_protosw *p); - extern const struct proto_ops ninet_dgram_ops; extern const struct proto_ops ninet_stream_ops; extern struct neigh_table nnd_tbl; @@ -90,15 +82,10 @@ static inline u32 nip_addr_hash(const struct nip_addr *a) int nip_send_skb(struct sk_buff *skb); void ninet_destroy_sock(struct sock *sk); -int nip_datagram_connect(struct sock *sk, struct sockaddr *addr, int addr_len); -int nip_datagram_connect_v6_only(struct sock *sk, struct sockaddr *addr, - int addr_len); +int nip_datagram_connect_v6_only(struct sock *sk, struct sockaddr *addr, int addr_len); int nip_datagram_dst_update(struct sock *sk, bool fix_sk_saddr); -void nip_datagram_release_cb(struct sock *sk); -int ninet_add_protocol(const struct ninet_protocol *prot, - unsigned char protocol); -int ninet_eld_protocol(const struct ninet_protocol *prot, - unsigned char protocol); +int ninet_add_protocol(const struct ninet_protocol *prot, unsigned char protocol); +int ninet_del_protocol(const struct ninet_protocol *prot, unsigned char protocol); int ninet_register_protosw(struct inet_protosw *p); void ninet_unregister_protosw(struct inet_protosw *p); int nip_input(struct sk_buff *skb); @@ -132,12 +119,6 @@ int nip_getsockopt(struct sock *sk, int level, /* functions defined in nip_addrconf.c */ int nip_addrconf_get_ifaddr(struct net *net, unsigned int cmd, void __user *arg); -bool nip_rcv_saddr_equal(const struct nip_addr *sk1_rcv_saddr, - const struct nip_addr *sk2_rcv_saddr, - bool sk2_isnewip, - bool match_sk1_wildcard, - bool match_sk2_wildcard); - void nip_dbg(const char *fmt, ...); #define DEBUG(format, ...) nip_dbg(format, ##__VA_ARGS__) diff --git a/code/linux/include/net/transp_nip.h b/code/linux/include/net/transp_nip.h index 2688e55..35fe52c 100644 --- a/code/linux/include/net/transp_nip.h +++ b/code/linux/include/net/transp_nip.h @@ -26,11 +26,4 @@ void nip_dgram_sock_seq_show(struct seq_file *seq, struct sock *sp, __u16 srcp, void ninet_destroy_sock(struct sock *sk); -#define NEWIP_SEQ_DGRAM_HEADER \ - " s1 " \ - "local_address " \ - "remote_address " \ - "st tx_queue rc_queue tr tm->when retrnsmt" \ - " uid timeout inode ref pointer drops\n" - #endif diff --git a/code/linux/net/newip/Makefile b/code/linux/net/newip/Makefile index 5cf0307..18ae012 100644 --- a/code/linux/net/newip/Makefile +++ b/code/linux/net/newip/Makefile @@ -7,7 +7,7 @@ obj-$(CONFIG_NEWIP) += newip.o -newip-objs := nip_addr.o nip_hdr_encap.o nip_hdr_decap.o nip_checksum.o af_ninet.o nip_input.o udp.o protocol.o nip_output.o datagram.o nip_addrconf.o nip_addrconf_core.o route.o nip_fib.o nip_fib_rules.o nndisc.o icmp.o tcp_nip_parameter.o +newip-objs := nip_addr.o nip_hdr_encap.o nip_hdr_decap.o nip_checksum.o af_ninet.o nip_input.o udp.o protocol.o nip_output.o nip_addrconf.o nip_addrconf_core.o route.o nip_fib.o nip_fib_rules.o nndisc.o icmp.o tcp_nip_parameter.o newip-objs += tcp_nip.o ninet_connection_sock.o ninet_hashtables.o tcp_nip_output.o tcp_nip_input.o tcp_nip_timer.o nip_sockglue.o ifeq ($(CONFIG_NEWIP_HOOKS), y) diff --git a/code/linux/net/newip/af_ninet.c b/code/linux/net/newip/af_ninet.c index 3d8dbdd..867f4d2 100644 --- a/code/linux/net/newip/af_ninet.c +++ b/code/linux/net/newip/af_ninet.c @@ -7,6 +7,8 @@ * * Based on linux/net/ipv6/af_inet6.c */ +#define pr_fmt(fmt) "NIP AF-NIET: " fmt + #include #include #include @@ -61,8 +63,7 @@ atomic_t g_nip_socket_number = ATOMIC_INIT(0); static int disable_nip_mod; module_param_named(disable, disable_nip_mod, int, 0444); -MODULE_PARM_DESC(disable, - "Disable NewIP module such that it is non_functional"); +MODULE_PARM_DESC(disable, "Disable NewIP module such that it is non_functional"); bool newip_mod_enabled(void) { @@ -667,9 +668,8 @@ static int __init ninet_init(void) for (r = &inetsw_nip[0]; r < &inetsw_nip[SOCK_MAX]; ++r) INIT_LIST_HEAD(r); - if (disable_nip_mod) { - DEBUG("Loaded, but adminstratively disabled,"); - DEBUG("reboot required to enable"); + if (!newip_mod_enabled()) { + DEBUG("Loaded, but administratively disabled, reboot required to enable"); goto out; } @@ -748,8 +748,10 @@ out: return err; nip_packet_fail: -udp_fail: + tcp_nip_exit(); tcp_fail: + nip_udp_exit(); +udp_fail: nip_addrconf_cleanup(); nip_addr_fail: nip_route_cleanup(); diff --git a/code/linux/net/newip/datagram.c b/code/linux/net/newip/datagram.c deleted file mode 100644 index e4e6709..0000000 --- a/code/linux/net/newip/datagram.c +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * - * NewIP common UDP code - * Linux NewIP INET implementation - * - * Adapted from linux/net/ipv6/datagram.c - */ -#include -#include -#include -#include -#include - -int nip_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) -{ - int res = 0; - return res; -} - -void nip_datagram_release_cb(struct sock *sk) -{ - ; -} - diff --git a/code/linux/net/newip/icmp.c b/code/linux/net/newip/icmp.c index 11c3ff7..c376a0e 100644 --- a/code/linux/net/newip/icmp.c +++ b/code/linux/net/newip/icmp.c @@ -46,16 +46,8 @@ int nip_icmp_rcv(struct sk_buff *skb) return ret; } -static void nip_icmp_err(struct sk_buff *skb, - struct ninet_skb_parm *opt, - u8 type, uint8_t code, - int offset, __be32 info) -{ -} - static const struct ninet_protocol nip_icmp_protocol = { .handler = nip_icmp_rcv, - .err_handler = nip_icmp_err, .flags = 0, }; diff --git a/code/linux/net/newip/ninet_connection_sock.c b/code/linux/net/newip/ninet_connection_sock.c index cfff906..7d92e4f 100644 --- a/code/linux/net/newip/ninet_connection_sock.c +++ b/code/linux/net/newip/ninet_connection_sock.c @@ -88,15 +88,3 @@ void ninet_csk_reqsk_queue_hash_add(struct sock *sk, struct request_sock *req, inet_csk_reqsk_queue_added(sk); } -/* Function - * Check whether the socket conflicts with the linked list. If no, 0 is returned - * Parameter - * sk: The transport control block to listen - * tb: bind bucket, sock list for storing bind - */ -int ninet_csk_bind_conflict(const struct sock *sk, - const struct inet_bind_bucket *tb, bool relax) -{ - return 0; -} - diff --git a/code/linux/net/newip/nip_addrconf.c b/code/linux/net/newip/nip_addrconf.c index db671bf..e1ee256 100644 --- a/code/linux/net/newip/nip_addrconf.c +++ b/code/linux/net/newip/nip_addrconf.c @@ -58,28 +58,6 @@ static struct nip_devconf newip_devconf_dflt __read_mostly = { .ignore_routes_with_linkdown = 0, }; -/* only match New IP sock - * match_sk*_wildcard == true: NIP_ADDR_ANY equals to any New IP addresses - * - * match_sk*_wildcard == false: addresses must be exactly the same, i.e. - * NIP_ADDR_ANY only equals to NIP_ADDR_ANY - */ -bool nip_rcv_saddr_equal(const struct nip_addr *sk1_rcv_saddr, - const struct nip_addr *sk2_rcv_saddr, - bool sk2_isnewip, - bool match_sk1_wildcard, - bool match_sk2_wildcard) -{ - if (!sk2_isnewip) - return false; - if (nip_addr_eq(sk1_rcv_saddr, sk2_rcv_saddr)) - return true; - return (match_sk1_wildcard && - nip_addr_eq(sk1_rcv_saddr, &nip_any_addr)) || - (match_sk2_wildcard && - nip_addr_eq(sk2_rcv_saddr, &nip_any_addr)); -} - /* Check if link is ready: is it up and is a valid qdisc available */ static inline bool nip_addrconf_link_ready(const struct net_device *dev) { @@ -484,37 +462,6 @@ static bool nip_chk_same_addr(struct net *net, const struct nip_addr *addr, return false; } -int __nip_get_lladdr(struct ninet_dev *idev, struct nip_addr *addr, u32 banned_flags) -{ - struct ninet_ifaddr *ifp; - int err = -EADDRNOTAVAIL; - - list_for_each_entry_reverse(ifp, &idev->addr_list, if_list) { - if (!(ifp->flags & banned_flags)) { - *addr = ifp->addr; - err = 0; - break; - } - } - return err; -} - -int nip_get_lladdr(struct net_device *dev, struct nip_addr *addr, u32 banned_flags) -{ - struct ninet_dev *idev; - int err = -EADDRNOTAVAIL; - - rcu_read_lock(); - idev = __nin_dev_get(dev); - if (idev) { - read_lock_bh(&idev->lock); - err = __nip_get_lladdr(idev, addr, banned_flags); - read_unlock_bh(&idev->lock); - } - rcu_read_unlock(); - return err; -} - static int __nip_get_firstaddr(struct ninet_dev *idev, struct nip_addr *addr) { struct ninet_ifaddr *ifp; diff --git a/code/linux/net/newip/nip_addrconf_core.c b/code/linux/net/newip/nip_addrconf_core.c index 12d104d..34e9867 100644 --- a/code/linux/net/newip/nip_addrconf_core.c +++ b/code/linux/net/newip/nip_addrconf_core.c @@ -26,10 +26,7 @@ void nin_dev_finish_destroy(struct ninet_dev *idev) WARN_ON(!list_empty(&idev->addr_list)); dev_put(dev); - if (!idev->dead) { - DEBUG(KERN_WARNING "Freeing alive ninet device.\n"); - return; - } - call_rcu(&idev->rcu, nin_dev_finish_destroy_rcu); + if (idev->dead) + call_rcu(&idev->rcu, nin_dev_finish_destroy_rcu); } diff --git a/code/linux/net/newip/tcp_nip_output.c b/code/linux/net/newip/tcp_nip_output.c index d3fe24d..045f290 100644 --- a/code/linux/net/newip/tcp_nip_output.c +++ b/code/linux/net/newip/tcp_nip_output.c @@ -92,27 +92,6 @@ int tcp_nip_mtu_to_mss(struct sock *sk, int pmtu) (tcp_sk(sk)->tcp_header_len - sizeof(struct tcphdr)); } -/* Inverse of above */ -int tcp_nip_mss_to_mtu(struct sock *sk, int mss) -{ - const struct tcp_sock *tp = tcp_sk(sk); - const struct inet_connection_sock *icsk = inet_csk(sk); - int mtu; - int nip_hdr_len = get_nip_hdr_len(NIP_HDR_COMM, &sk->sk_nip_rcv_saddr, &sk->sk_nip_daddr); - - nip_hdr_len = nip_hdr_len == 0 ? NIP_HDR_MAX : nip_hdr_len; - mtu = mss + tp->tcp_header_len + icsk->icsk_ext_hdr_len + nip_hdr_len; - - /* IPv6 adds a frag_hdr in case RTAX_FEATURE_ALLFRAG is set */ - if (icsk->icsk_af_ops->net_frag_header_len) { - const struct dst_entry *dst = __sk_dst_get(sk); - - if (dst && dst_allfrag(dst)) - mtu += icsk->icsk_af_ops->net_frag_header_len; - } - return mtu; -} - static inline void tcp_advance_send_head(struct sock *sk, const struct sk_buff *skb) { if (tcp_skb_is_last(sk, skb)) @@ -197,22 +176,6 @@ u32 __nip_tcp_select_window(struct sock *sk) DEBUG("%s wscale(%u) win change [%u to %u], [allowed|free]space=[%u, %u], mss=%u", __func__, tp->rx_opt.rcv_wscale, free_space, window, allowed_space, free_space, mss); - } else { - window = tp->rcv_wnd; - /* Get the largest window that is a nice multiple of mss. - * Window clamp already applied above. - * If our current window offering is within 1 mss of the - * free space we just keep it. This prevents the divide - * and multiply from happening most of the time. - * We also don't do any window rounding when the free space - * is too small. - */ - if (window <= free_space - mss || window > free_space) - window = rounddown(free_space, mss); - else if (mss == full_space && - free_space > window + (full_space >> 1)) - window = free_space; - DEBUG("%s win change [%u to %u]", __func__, tp->rcv_wnd, window); } return window; } diff --git a/code/linux/net/newip/udp.c b/code/linux/net/newip/udp.c index abfcca6..c36b6a1 100644 --- a/code/linux/net/newip/udp.c +++ b/code/linux/net/newip/udp.c @@ -430,25 +430,11 @@ static const struct ninet_protocol nip_udp_protocol = { .flags = 0, }; -int udp_stub_hash(struct sock *sk) -{ - return 0; -} - -void udp_stub_unhash(struct sock *sk) -{ -} - -void udp_stub_rehash(struct sock *sk) -{ -} - /* Newip Udp related operations */ struct proto nip_udp_prot = { .name = "nip_udp", .owner = THIS_MODULE, .close = udp_lib_close, - .connect = nip_datagram_connect, .disconnect = udp_disconnect, .ioctl = udp_ioctl, .init = udp_init_sock, @@ -458,10 +444,8 @@ struct proto nip_udp_prot = { .sendmsg = nip_udp_output, .recvmsg = nip_udp_recvmsg, .backlog_rcv = __nip_udp_queue_rcv_skb, - .release_cb = nip_datagram_release_cb, .hash = udp_lib_hash, .unhash = udp_lib_unhash, - .rehash = udp_stub_rehash, .get_port = nip_udp_get_port, .memory_allocated = &udp_memory_allocated, .sysctl_mem = sysctl_udp_mem, -- Gitee From a592016130d044a61c01de665d0731996354697a Mon Sep 17 00:00:00 2001 From: yangyanjun Date: Fri, 30 Sep 2022 10:32:21 +0800 Subject: [PATCH 02/10] =?UTF-8?q?SIG=E9=81=97=E7=95=99=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=201=E3=80=81license=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E4=BB=A3=E7=A0=81=E6=96=87=E4=BB=B6=E5=A4=B4?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E2=80=9CNewIP=20is=20dual=20licensed:=20you?= =?UTF-8?q?=20can=20use=20it=20under=20the=20terms=20of=20the=20GPL=20V2?= =?UTF-8?q?=20and=20the=20BSD2=20license=E2=80=9D=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=EF=BC=8C=E5=8F=AA=E5=9C=A8=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E4=BB=93=E6=A0=B9=E7=9B=AE=E5=BD=95license=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=AD=E6=8F=8F=E8=BF=B0=E6=AF=8F=E4=B8=AA=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E7=9A=84license=E5=8D=B3=E5=8F=AF=E3=80=82=202=E3=80=81?= =?UTF-8?q?=E5=8F=AA=E4=BF=9D=E7=95=99=E6=A0=B9=E7=9B=AE=E5=BD=95license?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=8C=E5=8E=BB=E6=8E=89=E5=AD=90=E7=9B=AE?= =?UTF-8?q?=E5=BD=95license=E6=96=87=E4=BB=B6=E3=80=82=203=E3=80=81NewIP?= =?UTF-8?q?=E6=98=AF=E7=BD=91=E7=BB=9C5.0=E8=81=94=E7=9B=9F=E5=85=B1?= =?UTF-8?q?=E5=90=8C=E6=8E=A8=E5=87=BA=E7=9A=84=E6=96=B0=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=EF=BC=8C=E5=B1=9E=E4=BA=8E=E5=85=AC=E5=85=B1=EF=BC=8C=E5=BB=BA?= =?UTF-8?q?=E8=AE=AE=E5=85=AC=E5=85=B1=E4=BB=A3=E7=A0=81license=E4=BD=BF?= =?UTF-8?q?=E7=94=A8BSD-3=EF=BC=8C=E4=B8=8D=E8=A6=81=E4=BD=BF=E7=94=A8BSD-?= =?UTF-8?q?2=E3=80=82liteOS=E6=98=AFBSD-3=EF=BC=8C=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E7=94=A8BSD-2=EF=BC=8C=E5=B1=9E=E4=BA=8E=E5=8F=8D=E5=90=91?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E3=80=82=204=E3=80=81linux=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0README.OpenSource=EF=BC=8C=E7=9B=B8=E5=BD=93?= =?UTF-8?q?=E4=BA=8ENewIP=E5=BC=95=E7=94=A8Linux=E5=86=85=E6=A0=B8?= =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E8=BD=AF=E4=BB=B6=E7=9A=84=E5=BD=A2?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E5=8F=82=E8=80=83=E9=B8=BF=E8=92=99=E7=A4=BE?= =?UTF-8?q?=E5=8C=BALinux-5.10=E5=86=85=E6=A0=B8=E4=BB=93README.OpenSource?= =?UTF-8?q?=E3=80=82=205=E3=80=81communication=5Fsfc=5Fnewip/code=20?= =?UTF-8?q?=E6=94=B9=20src=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangyanjun --- LICENSE | 14 +- README.OpenSource | 11 + apply_newip.sh | 58 +-- code/common/LICENSE | 29 -- code/linux/LICENSE | 359 ------------------ figures/image-20220901152539801.png | Bin 19225 -> 18867 bytes {code => src}/common/nip_addr.c | 0 {code => src}/common/nip_addr.h | 0 {code => src}/common/nip_checksum.c | 0 {code => src}/common/nip_checksum.h | 0 {code => src}/common/nip_hdr.h | 0 {code => src}/common/nip_hdr_decap.c | 0 {code => src}/common/nip_hdr_encap.c | 0 .../linux/include/linux/newip_route.h | 0 {code => src}/linux/include/linux/nip.h | 0 {code => src}/linux/include/linux/nip_icmp.h | 0 {code => src}/linux/include/net/flow_nip.h | 0 {code => src}/linux/include/net/if_ninet.h | 0 {code => src}/linux/include/net/netns/nip.h | 0 .../linux/include/net/ninet_connection_sock.h | 0 .../linux/include/net/ninet_hashtables.h | 0 {code => src}/linux/include/net/nip.h | 0 .../linux/include/net/nip_addrconf.h | 0 {code => src}/linux/include/net/nip_fib.h | 0 {code => src}/linux/include/net/nip_route.h | 0 {code => src}/linux/include/net/nip_udp.h | 0 {code => src}/linux/include/net/nndisc.h | 0 {code => src}/linux/include/net/tcp_nip.h | 0 {code => src}/linux/include/net/transp_nip.h | 0 .../linux/include/trace/hooks/nip_hooks.h | 0 .../linux/include/uapi/linux/newip_route.h | 0 {code => src}/linux/include/uapi/linux/nip.h | 0 .../linux/include/uapi/linux/nip_icmp.h | 0 {code => src}/linux/net/newip/Kconfig | 0 {code => src}/linux/net/newip/Makefile | 0 {code => src}/linux/net/newip/af_ninet.c | 0 {code => src}/linux/net/newip/hooks/Kconfig | 0 {code => src}/linux/net/newip/hooks/Makefile | 0 .../linux/net/newip/hooks/nip_hooks.c | 0 {code => src}/linux/net/newip/icmp.c | 0 .../linux/net/newip/ninet_connection_sock.c | 0 .../linux/net/newip/ninet_hashtables.c | 0 {code => src}/linux/net/newip/nip_addrconf.c | 0 .../linux/net/newip/nip_addrconf_core.c | 0 {code => src}/linux/net/newip/nip_fib.c | 0 {code => src}/linux/net/newip/nip_fib_rules.c | 0 .../linux/net/newip/nip_hooks_register.c | 0 .../linux/net/newip/nip_hooks_register.h | 0 {code => src}/linux/net/newip/nip_input.c | 0 {code => src}/linux/net/newip/nip_output.c | 0 {code => src}/linux/net/newip/nip_sockglue.c | 0 {code => src}/linux/net/newip/nndisc.c | 0 {code => src}/linux/net/newip/protocol.c | 0 {code => src}/linux/net/newip/route.c | 0 {code => src}/linux/net/newip/tcp_nip.c | 0 {code => src}/linux/net/newip/tcp_nip_input.c | 0 .../linux/net/newip/tcp_nip_output.c | 0 .../linux/net/newip/tcp_nip_parameter.c | 0 .../linux/net/newip/tcp_nip_parameter.h | 0 {code => src}/linux/net/newip/tcp_nip_timer.c | 0 {code => src}/linux/net/newip/udp.c | 0 61 files changed, 47 insertions(+), 424 deletions(-) create mode 100644 README.OpenSource delete mode 100644 code/common/LICENSE delete mode 100644 code/linux/LICENSE rename {code => src}/common/nip_addr.c (100%) rename {code => src}/common/nip_addr.h (100%) rename {code => src}/common/nip_checksum.c (100%) rename {code => src}/common/nip_checksum.h (100%) rename {code => src}/common/nip_hdr.h (100%) rename {code => src}/common/nip_hdr_decap.c (100%) rename {code => src}/common/nip_hdr_encap.c (100%) rename {code => src}/linux/include/linux/newip_route.h (100%) rename {code => src}/linux/include/linux/nip.h (100%) rename {code => src}/linux/include/linux/nip_icmp.h (100%) rename {code => src}/linux/include/net/flow_nip.h (100%) rename {code => src}/linux/include/net/if_ninet.h (100%) rename {code => src}/linux/include/net/netns/nip.h (100%) rename {code => src}/linux/include/net/ninet_connection_sock.h (100%) rename {code => src}/linux/include/net/ninet_hashtables.h (100%) rename {code => src}/linux/include/net/nip.h (100%) rename {code => src}/linux/include/net/nip_addrconf.h (100%) rename {code => src}/linux/include/net/nip_fib.h (100%) rename {code => src}/linux/include/net/nip_route.h (100%) rename {code => src}/linux/include/net/nip_udp.h (100%) rename {code => src}/linux/include/net/nndisc.h (100%) rename {code => src}/linux/include/net/tcp_nip.h (100%) rename {code => src}/linux/include/net/transp_nip.h (100%) rename {code => src}/linux/include/trace/hooks/nip_hooks.h (100%) rename {code => src}/linux/include/uapi/linux/newip_route.h (100%) rename {code => src}/linux/include/uapi/linux/nip.h (100%) rename {code => src}/linux/include/uapi/linux/nip_icmp.h (100%) rename {code => src}/linux/net/newip/Kconfig (100%) rename {code => src}/linux/net/newip/Makefile (100%) rename {code => src}/linux/net/newip/af_ninet.c (100%) rename {code => src}/linux/net/newip/hooks/Kconfig (100%) rename {code => src}/linux/net/newip/hooks/Makefile (100%) rename {code => src}/linux/net/newip/hooks/nip_hooks.c (100%) rename {code => src}/linux/net/newip/icmp.c (100%) rename {code => src}/linux/net/newip/ninet_connection_sock.c (100%) rename {code => src}/linux/net/newip/ninet_hashtables.c (100%) rename {code => src}/linux/net/newip/nip_addrconf.c (100%) rename {code => src}/linux/net/newip/nip_addrconf_core.c (100%) rename {code => src}/linux/net/newip/nip_fib.c (100%) rename {code => src}/linux/net/newip/nip_fib_rules.c (100%) rename {code => src}/linux/net/newip/nip_hooks_register.c (100%) rename {code => src}/linux/net/newip/nip_hooks_register.h (100%) rename {code => src}/linux/net/newip/nip_input.c (100%) rename {code => src}/linux/net/newip/nip_output.c (100%) rename {code => src}/linux/net/newip/nip_sockglue.c (100%) rename {code => src}/linux/net/newip/nndisc.c (100%) rename {code => src}/linux/net/newip/protocol.c (100%) rename {code => src}/linux/net/newip/route.c (100%) rename {code => src}/linux/net/newip/tcp_nip.c (100%) rename {code => src}/linux/net/newip/tcp_nip_input.c (100%) rename {code => src}/linux/net/newip/tcp_nip_output.c (100%) rename {code => src}/linux/net/newip/tcp_nip_parameter.c (100%) rename {code => src}/linux/net/newip/tcp_nip_parameter.h (100%) rename {code => src}/linux/net/newip/tcp_nip_timer.c (100%) rename {code => src}/linux/net/newip/udp.c (100%) diff --git a/LICENSE b/LICENSE index 04199a4..c639838 100644 --- a/LICENSE +++ b/LICENSE @@ -1,11 +1,9 @@ -NewIP - New IP Stack +NewIP - New IP protocol stack Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. -NewIP is dual licensed: you can use it under the terms of the GPL V2 and the BSD2 license. - The code/linux/ subdirectorie is licensed under the GPL V2 License. -The code/ommon/ subdirectorie is licensed under 2-Clause BSD License. -The examples/ subdirectorie is licensed under 2-Clause BSD License. +The code/ommon/ subdirectorie is licensed under 3-Clause BSD License. +The examples/ subdirectorie is licensed under 3-Clause BSD License. a) GNU General Public License version 2, (https://opensource.org/licenses/GPL-2.0) This library is free software; you can redistribute it and/or @@ -23,8 +21,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -And, -b) The BSD2 License, (https://opensource.org/licenses/BSD-2-Clause) +b) The 3-Clause BSD License, (https://opensource.org/licenses/BSD-3-Clause) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -36,6 +33,9 @@ conditions are met: copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, diff --git a/README.OpenSource b/README.OpenSource new file mode 100644 index 0000000..7277cbb --- /dev/null +++ b/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "linux-5.10", + "License": "GPL-2.0+", + "License File": "COPYING", + "Version Number": "5.10.93", + "Owner": "liuyu82@huawei.com", + "Upstream URL": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/?h=linux-5.10.y", + "Description": "linux kernel 5.10" + } +] diff --git a/apply_newip.sh b/apply_newip.sh index bf1cfc2..a415b96 100644 --- a/apply_newip.sh +++ b/apply_newip.sh @@ -18,39 +18,39 @@ function main() { cd $KERNEL_BUILD_ROOT - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/linux/newip_route.h $KERNEL_BUILD_ROOT/include/linux/newip_route.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/linux/nip.h $KERNEL_BUILD_ROOT/include/linux/nip.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/linux/nip_icmp.h $KERNEL_BUILD_ROOT/include/linux/nip_icmp.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/linux/newip_route.h $KERNEL_BUILD_ROOT/include/linux/newip_route.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/linux/nip.h $KERNEL_BUILD_ROOT/include/linux/nip.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/linux/nip_icmp.h $KERNEL_BUILD_ROOT/include/linux/nip_icmp.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/net/netns/nip.h $KERNEL_BUILD_ROOT/include/net/netns/nip.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/net/flow_nip.h $KERNEL_BUILD_ROOT/include/net/flow_nip.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/net/if_ninet.h $KERNEL_BUILD_ROOT/include/net/if_ninet.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/net/ninet_connection_sock.h $KERNEL_BUILD_ROOT/include/net/ninet_connection_sock.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/net/ninet_hashtables.h $KERNEL_BUILD_ROOT/include/net/ninet_hashtables.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/net/nip.h $KERNEL_BUILD_ROOT/include/net/nip.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/net/nip_addrconf.h $KERNEL_BUILD_ROOT/include/net/nip_addrconf.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/net/nip_fib.h $KERNEL_BUILD_ROOT/include/net/nip_fib.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/net/nip_route.h $KERNEL_BUILD_ROOT/include/net/nip_route.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/net/nip_udp.h $KERNEL_BUILD_ROOT/include/net/nip_udp.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/net/nndisc.h $KERNEL_BUILD_ROOT/include/net/nndisc.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/net/tcp_nip.h $KERNEL_BUILD_ROOT/include/net/tcp_nip.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/net/transp_nip.h $KERNEL_BUILD_ROOT/include/net/transp_nip.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/net/netns/nip.h $KERNEL_BUILD_ROOT/include/net/netns/nip.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/net/flow_nip.h $KERNEL_BUILD_ROOT/include/net/flow_nip.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/net/if_ninet.h $KERNEL_BUILD_ROOT/include/net/if_ninet.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/net/ninet_connection_sock.h $KERNEL_BUILD_ROOT/include/net/ninet_connection_sock.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/net/ninet_hashtables.h $KERNEL_BUILD_ROOT/include/net/ninet_hashtables.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/net/nip.h $KERNEL_BUILD_ROOT/include/net/nip.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/net/nip_addrconf.h $KERNEL_BUILD_ROOT/include/net/nip_addrconf.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/net/nip_fib.h $KERNEL_BUILD_ROOT/include/net/nip_fib.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/net/nip_route.h $KERNEL_BUILD_ROOT/include/net/nip_route.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/net/nip_udp.h $KERNEL_BUILD_ROOT/include/net/nip_udp.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/net/nndisc.h $KERNEL_BUILD_ROOT/include/net/nndisc.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/net/tcp_nip.h $KERNEL_BUILD_ROOT/include/net/tcp_nip.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/net/transp_nip.h $KERNEL_BUILD_ROOT/include/net/transp_nip.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/uapi/linux/newip_route.h $KERNEL_BUILD_ROOT/include/uapi/linux/newip_route.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/uapi/linux/nip.h $KERNEL_BUILD_ROOT/include/uapi/linux/nip.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/uapi/linux/nip_icmp.h $KERNEL_BUILD_ROOT/include/uapi/linux/nip_icmp.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/uapi/linux/newip_route.h $KERNEL_BUILD_ROOT/include/uapi/linux/newip_route.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/uapi/linux/nip.h $KERNEL_BUILD_ROOT/include/uapi/linux/nip.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/uapi/linux/nip_icmp.h $KERNEL_BUILD_ROOT/include/uapi/linux/nip_icmp.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/include/trace/hooks/nip_hooks.h $KERNEL_BUILD_ROOT/include/trace/hooks/nip_hooks.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/include/trace/hooks/nip_hooks.h $KERNEL_BUILD_ROOT/include/trace/hooks/nip_hooks.h - ln -s -f $NEWIP_SOURCE_ROOT/code/linux/net/newip $KERNEL_BUILD_ROOT/net - ln -s -f $NEWIP_SOURCE_ROOT/code/common/nip_addr.c $KERNEL_BUILD_ROOT/net/newip/nip_addr.c - ln -s -f $NEWIP_SOURCE_ROOT/code/common/nip_addr.h $KERNEL_BUILD_ROOT/net/newip/nip_addr.h - ln -s -f $NEWIP_SOURCE_ROOT/code/common/nip_addr.h $KERNEL_BUILD_ROOT/include/uapi/linux/nip_addr.h - ln -s -f $NEWIP_SOURCE_ROOT/code/common/nip_checksum.c $KERNEL_BUILD_ROOT/net/newip/nip_checksum.c - ln -s -f $NEWIP_SOURCE_ROOT/code/common/nip_checksum.h $KERNEL_BUILD_ROOT/net/newip/nip_checksum.h - ln -s -f $NEWIP_SOURCE_ROOT/code/common/nip_hdr_decap.c $KERNEL_BUILD_ROOT/net/newip/nip_hdr_decap.c - ln -s -f $NEWIP_SOURCE_ROOT/code/common/nip_hdr_encap.c $KERNEL_BUILD_ROOT/net/newip/nip_hdr_encap.c - ln -s -f $NEWIP_SOURCE_ROOT/code/common/nip_hdr.h $KERNEL_BUILD_ROOT/net/newip/nip_hdr.h + ln -s -f $NEWIP_SOURCE_ROOT/src/linux/net/newip $KERNEL_BUILD_ROOT/net + ln -s -f $NEWIP_SOURCE_ROOT/src/common/nip_addr.c $KERNEL_BUILD_ROOT/net/newip/nip_addr.c + ln -s -f $NEWIP_SOURCE_ROOT/src/common/nip_addr.h $KERNEL_BUILD_ROOT/net/newip/nip_addr.h + ln -s -f $NEWIP_SOURCE_ROOT/src/common/nip_addr.h $KERNEL_BUILD_ROOT/include/uapi/linux/nip_addr.h + ln -s -f $NEWIP_SOURCE_ROOT/src/common/nip_checksum.c $KERNEL_BUILD_ROOT/net/newip/nip_checksum.c + ln -s -f $NEWIP_SOURCE_ROOT/src/common/nip_checksum.h $KERNEL_BUILD_ROOT/net/newip/nip_checksum.h + ln -s -f $NEWIP_SOURCE_ROOT/src/common/nip_hdr_decap.c $KERNEL_BUILD_ROOT/net/newip/nip_hdr_decap.c + ln -s -f $NEWIP_SOURCE_ROOT/src/common/nip_hdr_encap.c $KERNEL_BUILD_ROOT/net/newip/nip_hdr_encap.c + ln -s -f $NEWIP_SOURCE_ROOT/src/common/nip_hdr.h $KERNEL_BUILD_ROOT/net/newip/nip_hdr.h cd - } diff --git a/code/common/LICENSE b/code/common/LICENSE deleted file mode 100644 index d83b446..0000000 --- a/code/common/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -NewIP common -Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. - -The BSD2 License, (https://opensource.org/licenses/BSD-2-Clause) -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. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. diff --git a/code/linux/LICENSE b/code/linux/LICENSE deleted file mode 100644 index ff0812f..0000000 --- a/code/linux/LICENSE +++ /dev/null @@ -1,359 +0,0 @@ -Valid-License-Identifier: GPL-2.0 -Valid-License-Identifier: GPL-2.0-only -Valid-License-Identifier: GPL-2.0+ -Valid-License-Identifier: GPL-2.0-or-later -SPDX-URL: https://spdx.org/licenses/GPL-2.0.html -Usage-Guide: - To use this license in source code, put one of the following SPDX - tag/value pairs into a comment according to the placement - guidelines in the licensing rules documentation. - For 'GNU General Public License (GPL) version 2 only' use: - SPDX-License-Identifier: GPL-2.0 - or - SPDX-License-Identifier: GPL-2.0-only - For 'GNU General Public License (GPL) version 2 or any later version' use: - SPDX-License-Identifier: GPL-2.0+ - or - SPDX-License-Identifier: GPL-2.0-or-later -License-Text: - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/figures/image-20220901152539801.png b/figures/image-20220901152539801.png index 7a26e08dde2035080fd492ab6d2738b9e1a1eef1..4adcdeffc67754f3a7da8527c67eca22ddd9bbb4 100644 GIT binary patch literal 18867 zcmbun2|SeV+c!LwR8lHLS<9a6q3l^gmV~h{l`Z?eua%NLWJ}1tlVt3sh>Ly5%RtaQ8ZH*(vV z8{0Ch$6#hl)tyQ5r(b@$uax!B*ZIcYmh=iM4J?Kt%ZmmE`?=#ceCmjwGgu>0(NGC_ zo%w`L;p)H&!Fh)v+>*Y`FxHp{XVZs!rJ7I5ZTV6hS z;Y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qdr2xTIN01rRtln-CkQo?Xc)OIij}M@yx0kqswq{e2}LAXvV-cO zGworf(Iv4CR9X)>*V zltAgi!e(Sl+58xj+gDh$DMd8f_0W=y^&_N(A`(!I^XDR;XoOK|xX2fDD||a9=>s zroWPhu5ME=E*9%DhMR-(uD>|YFfY;Hot%*hwL*JBB}MJV2956CtnMCM!h%LuE{LUW zudU|8I2k;Y%rlTZIJinGaOqcG84HZGfqD{e+f#@9CxU-?AiB&UOJ1%q;kiIHGQx0v z%sw7_(SyOPC{_l;dBH-IQ|2Nd_Ul#NK&Cd3` z=Bk;1BUc~Wptu`>u= Date: Fri, 30 Sep 2022 14:51:45 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E5=A2=9E=E5=8A=A0wireshark=20NewIP?= =?UTF-8?q?=E6=8A=A5=E6=96=87=E8=A7=A3=E6=9E=90=E6=A8=A1=E6=9D=BF=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangyanjun --- OAT.xml | 29 +-- tools/wireshark_cfg_for_newip_v1.3.lua | 312 +++++++++++++++++++++++++ 2 files changed, 327 insertions(+), 14 deletions(-) create mode 100644 tools/wireshark_cfg_for_newip_v1.3.lua diff --git a/OAT.xml b/OAT.xml index 0ed7809..330d4ea 100644 --- a/OAT.xml +++ b/OAT.xml @@ -57,20 +57,21 @@ Note:If the text contains special characters, please escape them according to th - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/tools/wireshark_cfg_for_newip_v1.3.lua b/tools/wireshark_cfg_for_newip_v1.3.lua new file mode 100644 index 0000000..284596a --- /dev/null +++ b/tools/wireshark_cfg_for_newip_v1.3.lua @@ -0,0 +1,312 @@ +require "bit32" +--[[ +Function : wireshark lua configure for NewIP protocol stack +Author : yangyanjun +Edit Date : 2022/5/27 +SPDX-License-Identifier: GPL-2.0-or-later +--]] + +do -- lua begin + +--协议名称为NewIP,在Packet Details窗格显示为NewIP +-- create a new protocol +local nip_proto_name = "NewIP" +local nip_proto_desc = "NewIP Protocol" +local nip_proto_obj = Proto(nip_proto_name, nip_proto_desc) + +--[[ +NewIP协议字段定义 + ProtoField 参数: + para1 [必选] - 字段的缩写名称(过滤器中使用的字符串) + para2 [可选] - 字段的实际名称(出现在树中的字符串) + para3 [可选] - 字段类型 +--]] +local _ttl = ProtoField.uint8 (nip_proto_name .. ".ttl", "ttl", base.DEC) +local _total_len = ProtoField.uint16(nip_proto_name .. ".total_len", "total_len", base.DEC) +local _nexthdr = ProtoField.uint8 (nip_proto_name .. ".nexthdr", "nexthdr", base.DEC) +local _daddr = ProtoField.bytes (nip_proto_name .. ".daddr", "daddr", base.SPACE) +local _saddr = ProtoField.bytes (nip_proto_name .. ".saddr", "saddr", base.SPACE) +local _hdr_len = ProtoField.uint8 (nip_proto_name .. ".hdr_len", "hdr_len", base.DEC) +local _trans_data = ProtoField.bytes (nip_proto_name .. ".trans_data", "trans_data", base.SPACE) + +-- 将字段添加都协议中 +nip_proto_obj.fields = { + _ttl, + _total_len, + _nexthdr, + _daddr, + _saddr, + _hdr_len, + _trans_data +} +--获取 _trans_data 解析器 +local _unknown_data_dis = Dissector.get("data") + +--定义 bitmap1 子菜单 +-- create a new protocol +local bitmap1_name = "bitmap1" +local bitmap1_desc = "bitmap1" +local bitmap1_obj = Proto(bitmap1_name, bitmap1_desc) + +--[[ +bitmap1 子菜单字段定义 + ProtoField 参数: + para1 [必选] - 字段的缩写名称(过滤器中使用的字符串) + para2 [可选] - 字段的实际名称(出现在树中的字符串) + para3 [可选] - 字段类型 +--]] +local _bitmap1 = ProtoField.uint8(bitmap1_name .. ".bitmap1", "bitmap1", base.HEX) +local _nip_valid = ProtoField.uint8(bitmap1_name .. ".nip_valid", "nip_valid", base.DEC) +local _include_ttl = ProtoField.uint8(bitmap1_name .. ".include_ttl", "include_ttl", base.DEC) +local _include_total_len = ProtoField.uint8(bitmap1_name .. ".include_total_len", "include_total_len", base.DEC) +local _include_nexthdr = ProtoField.uint8(bitmap1_name .. ".include_nexthdr", "include_nexthdr", base.DEC) +local _include_daddr = ProtoField.uint8(bitmap1_name .. ".include_daddr", "include_daddr", base.DEC) +local _include_saddr = ProtoField.uint8(bitmap1_name .. ".include_saddr", "include_saddr", base.DEC) +local _include_bitmap2 = ProtoField.uint8(bitmap1_name .. ".include_bitmap2", "include_bitmap2", base.DEC) + +-- 将字段添加都协议中 +bitmap1_obj.fields = { + _bitmap1, _nip_valid, _include_ttl, _include_total_len, _include_nexthdr, _include_daddr, _include_saddr, _include_bitmap2 +} + +--定义 bitmap2 子菜单 +-- create a new protocol +local bitmap2_name = "bitmap2" +local bitmap2_desc = "bitmap2" +local bitmap2_obj = Proto(bitmap2_name, bitmap2_desc) + +--[[ +bitmap2 子菜单字段定义 + ProtoField 参数: + para1 [必选] - 字段的缩写名称(过滤器中使用的字符串) + para2 [可选] - 字段的实际名称(出现在树中的字符串) + para3 [可选] - 字段类型 +--]] +local _bitmap2 = ProtoField.uint8(bitmap2_name .. ".bitmap2", "bitmap2", base.HEX) +local _include_hdr_len = ProtoField.uint8(bitmap2_name .. ".include_hdr_len", "include_hdr_len", base.DEC) + +-- 将字段添加都协议中 +bitmap2_obj.fields = { + _bitmap2, _include_hdr_len +} + +--定义 nd icmp 子菜单 +-- create a new protocol +local nd_icmp_name = "nd_icmp" +local nd_icmp_desc = "nd_icmp" +local nd_icmp_obj = Proto(nd_icmp_name, nd_icmp_desc) + +--[[ +nd_icmp 子菜单字段定义 + ProtoField 参数: + para1 [必选] - 字段的缩写名称(过滤器中使用的字符串) + para2 [可选] - 字段的实际名称(出现在树中的字符串) + para3 [可选] - 字段类型 +--]] +local _type = ProtoField.uint8 (nd_icmp_name .. ".type", "type", base.DEC) +local _code = ProtoField.uint8 (nd_icmp_name .. ".code", "code", base.DEC) +local _checksum = ProtoField.uint16(nd_icmp_name .. ".checksum", "checksum", base.HEX) +local _rs_daddr = ProtoField.bytes (nd_icmp_name .. ".rs_daddr", "rs_daddr", base.SPACE) +local _mac_len = ProtoField.uint8 (nd_icmp_name .. ".mac_len", "mac_len", base.DEC) +local _mac = ProtoField.bytes (nd_icmp_name .. ".mac", "mac", base.SPACE) + +-- 将字段添加都协议中 +nd_icmp_obj.fields = { + _type, _code, _checksum, _rs_daddr, _mac_len, _mac +} + +--[[ + 下面定义 newip 解析器的主函数 + 第一个参数是 tvb 类型,表示的是需要此解析器解析的数据 + 第二个参数是 pinfo 类型,是协议解析树上的信息,包括 UI 上的显示 + 第三个参数是 treeitem 类型,表示上一级解析树 +--]] +function nip_dissector(tvb, pinfo, treeitem) + --设置一些 UI 上面的信息 + pinfo.cols.protocol:set(nip_proto_name) + pinfo.cols.info:set(nip_proto_desc) + + local offset = 0 + local tvb_len = tvb:len() + local nexthdr = 0 + + -- 在上一级解析树上创建 nip 的根节点 + local nip_tree = treeitem:add(nip_proto_obj, tvb:range(tvb_len)) + + local bitmap1 = tvb(offset, 1) --表示从报文缓冲区0开始取1个字节 + local bitmap1_val = tvb(offset, 1):uint() + local nip_valid = bit.band(bit.rshift(bitmap1_val, 7), 0x00000001) --右移 7 位 与 0x01 相与,获取 nip_valid 位 + local include_ttl = bit.band(bit.rshift(bitmap1_val, 6), 0x00000001) --右移 6 位 与 0x01 相与,获取 include_ttl 位 + local include_total_len = bit.band(bit.rshift(bitmap1_val, 5), 0x00000001) --右移 5 位 与 0x01 相与,获取 include_total_len 位 + local include_nexthdr = bit.band(bit.rshift(bitmap1_val, 4), 0x00000001) --右移 4 位 与 0x01 相与,获取 include_nexthdr 位 + local include_daddr = bit.band(bit.rshift(bitmap1_val, 2), 0x00000001) --右移 2 位 与 0x01 相与,获取 include_daddr 位 + local include_saddr = bit.band(bit.rshift(bitmap1_val, 1), 0x00000001) --右移 1 位 与 0x01 相与,获取 include_saddr 位 + local include_bitmap2 = bit.band(bitmap1_val, 0x00000001) --获取 include_bitmap2 位 + offset = offset + 1 --_bitmap1 占用1字节 + + --nip报头无效(0表示有效) + if nip_valid ~= 0 then + return false + else + --bitmap1子菜单 + local bitmap1_tree = nip_tree:add(bitmap1_obj, tvb:range(tvb_len)) + bitmap1_tree:add(_bitmap1, bitmap1) + bitmap1_tree:add(_nip_valid, nip_valid) + + if include_ttl then + bitmap1_tree:add(_include_ttl, include_ttl) + end + + if include_total_len then + bitmap1_tree:add(_include_total_len, include_total_len) + end + + if include_nexthdr then + bitmap1_tree:add(_include_nexthdr, include_nexthdr) + end + + if include_daddr then + bitmap1_tree:add(_include_daddr, include_daddr) + end + + if include_saddr then + bitmap1_tree:add(_include_saddr, include_saddr) + end + + if include_bitmap2 then + bitmap1_tree:add(_include_bitmap2, include_bitmap2) + end + end + + if include_bitmap2 ~= 0 then + --bitmap2子菜单 + local bitmap2_tree = nip_tree:add(bitmap2_obj, tvb:range(tvb_len)) + local bitmap2 = tvb(offset, 1) + local bitmap2_val = tvb(offset, 1):uint() + local include_hdr_len = bit.band(bit.rshift(bitmap2_val, 7), 0x00000001) --右移 7 位 与 0x01 相与,获取 include_hdr_len 位 + offset = offset + 1 --_bitmap2 占用1字节 + + bitmap2_tree:add(_bitmap2, bitmap2) + + if include_hdr_len then + bitmap2_tree:add(_include_hdr_len, include_hdr_len) + end + end + + if include_ttl then + nip_tree:add(_ttl, tvb(offset, 1)) + offset = offset + 1 --_ttl 占用1字节 + end + + if include_total_len then + nip_tree:add(_total_len, tvb(offset, 2)) + offset = offset + 2 --_total_len 占用2字节 + end + + if include_nexthdr then + nexthdr = tvb(offset, 1):uint() + nip_tree:add(_nexthdr, tvb(offset, 1)) + offset = offset + 1 --_nexthdr 占用1字节 + end + + if include_daddr then + local first_addr = tvb(offset, 1):uint() + local addr_len = get_nip_addr_len (first_addr) + if addr_len == 0 then + return false + end + nip_tree:add(_daddr, tvb(offset, addr_len)) + offset = offset + addr_len --_daddr 占用 addr_len 字节 + end + + if include_saddr then + local first_addr = tvb(offset, 1):uint() + local addr_len = get_nip_addr_len (first_addr) + if addr_len == 0 then + return false + end + nip_tree:add(_saddr, tvb(offset, addr_len)) + offset = offset + addr_len --_daddr 占用 addr_len 字节 + end + + if include_hdr_len then + nip_tree:add(_hdr_len, tvb(offset, 1)) + offset = offset + 1 --_hdr_len 占用1字节 + end + + --根据next header 确定上层协议 + local trans_data = tvb(offset, tvb_len - offset) + if (nexthdr == 177) then + local nd_icmp_tree = nip_tree:add(nd_icmp_obj, tvb:range(tvb_len)) + local type = tvb(offset, 1):uint() + nd_icmp_tree:add(_type, tvb(offset, 1)) + offset = offset + 1 + nd_icmp_tree:add(_code, tvb(offset, 1)) + offset = offset + 1 + nd_icmp_tree:add(_checksum, tvb(offset, 1)) + offset = offset + 1 + if type == 1 then + nd_icmp_tree:add(_rs_daddr, tvb(offset, 1)) + offset = offset + 1 + pinfo.cols.protocol = "ND request based NewIP" + else + nd_icmp_tree:add(_mac_len, tvb(offset, 1)) + offset = offset + 1 + nd_icmp_tree:add(_mac, tvb(offset, 6)) + offset = offset + 6 + pinfo.cols.protocol = "ND response based NewIP" + end + elseif (nexthdr == 6) then + Dissector.get("tcp"):call(trans_data:tvb(), pinfo, treeitem) + pinfo.cols.protocol = "TCP based NewIP" + elseif (nexthdr == 17) then + Dissector.get("udp"):call(trans_data:tvb(), pinfo, treeitem) + pinfo.cols.protocol = "UDP based NewIP" + else + nip_tree:add(_trans_data, trans_data) + end +end + +--[[ + 下面定义 NewIP 解析器的主函数,这个函数由 wireshark调用 + 第一个参数是 Tvb 类型,表示的是需要此解析器解析的数据 + 第二个参数是 Pinfo 类型,是协议解析树上的信息,包括 UI 上的显示 + 第三个参数是 TreeItem 类型,表示上一级解析树 +--]] +function nip_proto_obj.dissector(tvb, pinfo, treeitem) + if nip_dissector(tvb, pinfo, treeitem) then + --valid NewIP diagram + else + --不是NewIP协议(其他未知协议)时,直接输出报文数据 + _unknown_data_dis:call(tvb, pinfo, treeitem) + end + +end + + +--向 wireshark 注册协议插件被调用的条件 +local ipn_encap_table = DissectorTable.get("ethertype") +ipn_encap_table:add(0xEADD, nip_proto_obj) + +--NewIP地址长度计算 +function get_nip_addr_len (first_addr) + if first_addr <= 0xDC then + return 1 + elseif first_addr >= 0xDD and first_addr <= 0xF0 then + return 2 + elseif first_addr == 0xF1 then + return 3 + elseif first_addr == 0xF2 then + return 5 + elseif first_addr == 0xF3 then + return 7 + elseif first_addr == 0xF4 then + return 9 + elseif first_addr == 0xFF then + return 2 + else + return 0 + end +end + +end -- lua end -- Gitee From 18d8c5b31e16f7974e4b50e45193f879309d64c4 Mon Sep 17 00:00:00 2001 From: yangyanjun Date: Fri, 30 Sep 2022 14:55:00 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E5=88=B7=E6=96=B0README.OpenSource?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangyanjun --- README.OpenSource | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.OpenSource b/README.OpenSource index 7277cbb..5d105da 100644 --- a/README.OpenSource +++ b/README.OpenSource @@ -4,7 +4,7 @@ "License": "GPL-2.0+", "License File": "COPYING", "Version Number": "5.10.93", - "Owner": "liuyu82@huawei.com", + "Owner": "tanyanying@huawei.com", "Upstream URL": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/?h=linux-5.10.y", "Description": "linux kernel 5.10" } -- Gitee From e79c22d4b4851c67f32467d80316274c1709bc5b Mon Sep 17 00:00:00 2001 From: yangyanjun Date: Fri, 30 Sep 2022 15:00:14 +0800 Subject: [PATCH 05/10] =?UTF-8?q?readme=E6=96=87=E4=BB=B6=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangyanjun --- README_zh.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README_zh.md b/README_zh.md index a1d8be2..59ef5e5 100644 --- a/README_zh.md +++ b/README_zh.md @@ -47,7 +47,8 @@ NewIP内核协议栈主要代码目录结构如下: │ │ └── uapi │ └── net │ └── newip # NewIP 功能代码 -└── figures # ReadMe 内嵌图例 +├── figures # ReadMe 内嵌图例 +└── tools # NewIP 配套工具 ``` ## 编译构建 -- Gitee From 2fe5e159f7d1fa04dcf2d58c978c1d0b9f03d1b2 Mon Sep 17 00:00:00 2001 From: yangyanjun Date: Fri, 30 Sep 2022 15:38:34 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E5=A2=9E=E5=8A=A0wireshark=20NewIP?= =?UTF-8?q?=E6=8A=A5=E6=96=87=E8=A7=A3=E6=9E=90=E6=A8=A1=E6=9D=BF=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangyanjun --- ..._cfg_for_newip_v1.3.lua => wireshark_cfg_for_newip.lua} | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename tools/{wireshark_cfg_for_newip_v1.3.lua => wireshark_cfg_for_newip.lua} (96%) diff --git a/tools/wireshark_cfg_for_newip_v1.3.lua b/tools/wireshark_cfg_for_newip.lua similarity index 96% rename from tools/wireshark_cfg_for_newip_v1.3.lua rename to tools/wireshark_cfg_for_newip.lua index 284596a..47a9602 100644 --- a/tools/wireshark_cfg_for_newip_v1.3.lua +++ b/tools/wireshark_cfg_for_newip.lua @@ -1,9 +1,10 @@ require "bit32" --[[ +SPDX-License-Identifier: GPL-2.0-or-later +Copyright (c) 2022 Huawei Device Co., Ltd. Function : wireshark lua configure for NewIP protocol stack Author : yangyanjun Edit Date : 2022/5/27 -SPDX-License-Identifier: GPL-2.0-or-later --]] do -- lua begin @@ -300,8 +301,8 @@ function get_nip_addr_len (first_addr) return 5 elseif first_addr == 0xF3 then return 7 - elseif first_addr == 0xF4 then - return 9 + elseif first_addr == 0xFE then + return 8 elseif first_addr == 0xFF then return 2 else -- Gitee From ccdb4353ef6320a24a60777f6e680fff07c792c9 Mon Sep 17 00:00:00 2001 From: yangyanjun Date: Fri, 30 Sep 2022 16:27:39 +0800 Subject: [PATCH 07/10] =?UTF-8?q?SIG=E9=81=97=E7=95=99=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangyanjun --- examples/newip_route.h | 16 ++++++++++------ examples/nip.h | 16 ++++++++++------ examples/nip_addr_cfg_demo.c | 16 ++++++++++------ examples/nip_lib.c | 16 ++++++++++------ examples/nip_lib.h | 16 ++++++++++------ examples/nip_route_cfg_demo.c | 16 ++++++++++------ examples/nip_tcp_client_demo.c | 16 ++++++++++------ examples/nip_tcp_server_demo.c | 16 ++++++++++------ examples/nip_udp_client_demo.c | 16 ++++++++++------ examples/nip_udp_server_demo.c | 16 ++++++++++------ src/common/nip_addr.c | 16 ++++++++++------ src/common/nip_addr.h | 16 ++++++++++------ src/common/nip_checksum.c | 16 ++++++++++------ src/common/nip_checksum.h | 16 ++++++++++------ src/common/nip_hdr.h | 16 ++++++++++------ src/common/nip_hdr_decap.c | 16 ++++++++++------ src/common/nip_hdr_encap.c | 16 ++++++++++------ 17 files changed, 170 insertions(+), 102 deletions(-) diff --git a/examples/newip_route.h b/examples/newip_route.h index b1f6118..37b136b 100644 --- a/examples/newip_route.h +++ b/examples/newip_route.h @@ -1,16 +1,20 @@ -/* SPDX-License-Identifier: BSD-2-Clause */ +/* SPDX-License-Identifier: BSD-3-Clause */ /* * Copyright (c) 2022 Huawei Device Co., Ltd. * * 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 + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, diff --git a/examples/nip.h b/examples/nip.h index 2dff039..773e069 100644 --- a/examples/nip.h +++ b/examples/nip.h @@ -1,16 +1,20 @@ -/* SPDX-License-Identifier: BSD-2-Clause */ +/* SPDX-License-Identifier: BSD-3-Clause */ /* * Copyright (c) 2022 Huawei Device Co., Ltd. * * 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 + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, diff --git a/examples/nip_addr_cfg_demo.c b/examples/nip_addr_cfg_demo.c index 7d2c310..7915b70 100644 --- a/examples/nip_addr_cfg_demo.c +++ b/examples/nip_addr_cfg_demo.c @@ -1,16 +1,20 @@ -// SPDX-License-Identifier: BSD-2-Clause +// SPDX-License-Identifier: BSD-3-Clause /* * Copyright (c) 2022 Huawei Device Co., Ltd. * * 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 + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, diff --git a/examples/nip_lib.c b/examples/nip_lib.c index b6a8c7d..ffad1c9 100644 --- a/examples/nip_lib.c +++ b/examples/nip_lib.c @@ -1,16 +1,20 @@ -// SPDX-License-Identifier: BSD-2-Clause +// SPDX-License-Identifier: BSD-3-Clause /* * Copyright (c) 2022 Huawei Device Co., Ltd. * * 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 + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, diff --git a/examples/nip_lib.h b/examples/nip_lib.h index 3a38b93..c324f4d 100644 --- a/examples/nip_lib.h +++ b/examples/nip_lib.h @@ -1,16 +1,20 @@ -/* SPDX-License-Identifier: BSD-2-Clause */ +/* SPDX-License-Identifier: BSD-3-Clause */ /* * Copyright (c) 2022 Huawei Device Co., Ltd. * * 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 + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, diff --git a/examples/nip_route_cfg_demo.c b/examples/nip_route_cfg_demo.c index 5ed1bd1..8a0d4b6 100644 --- a/examples/nip_route_cfg_demo.c +++ b/examples/nip_route_cfg_demo.c @@ -1,16 +1,20 @@ -// SPDX-License-Identifier: BSD-2-Clause +// SPDX-License-Identifier: BSD-3-Clause /* * Copyright (c) 2022 Huawei Device Co., Ltd. * * 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 + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, diff --git a/examples/nip_tcp_client_demo.c b/examples/nip_tcp_client_demo.c index 5344e2b..7a83be9 100644 --- a/examples/nip_tcp_client_demo.c +++ b/examples/nip_tcp_client_demo.c @@ -1,16 +1,20 @@ -// SPDX-License-Identifier: BSD-2-Clause +// SPDX-License-Identifier: BSD-3-Clause /* * Copyright (c) 2022 Huawei Device Co., Ltd. * * 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 + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, diff --git a/examples/nip_tcp_server_demo.c b/examples/nip_tcp_server_demo.c index f0ef196..b692e3a 100644 --- a/examples/nip_tcp_server_demo.c +++ b/examples/nip_tcp_server_demo.c @@ -1,16 +1,20 @@ -// SPDX-License-Identifier: BSD-2-Clause +// SPDX-License-Identifier: BSD-3-Clause /* * Copyright (c) 2022 Huawei Device Co., Ltd. * * 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 + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, diff --git a/examples/nip_udp_client_demo.c b/examples/nip_udp_client_demo.c index 7bd6d30..74f1634 100644 --- a/examples/nip_udp_client_demo.c +++ b/examples/nip_udp_client_demo.c @@ -1,16 +1,20 @@ -// SPDX-License-Identifier: BSD-2-Clause +// SPDX-License-Identifier: BSD-3-Clause /* * Copyright (c) 2022 Huawei Device Co., Ltd. * * 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 + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, diff --git a/examples/nip_udp_server_demo.c b/examples/nip_udp_server_demo.c index 612b3e8..07fc327 100644 --- a/examples/nip_udp_server_demo.c +++ b/examples/nip_udp_server_demo.c @@ -1,16 +1,20 @@ -// SPDX-License-Identifier: BSD-2-Clause +// SPDX-License-Identifier: BSD-3-Clause /* * Copyright (c) 2022 Huawei Device Co., Ltd. * * 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 + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, diff --git a/src/common/nip_addr.c b/src/common/nip_addr.c index ff1a1d2..cc5d2b3 100644 --- a/src/common/nip_addr.c +++ b/src/common/nip_addr.c @@ -1,16 +1,20 @@ -// SPDX-License-Identifier: BSD-2-Clause +// SPDX-License-Identifier: BSD-3-Clause /* * Copyright (c) 2022 Huawei Device Co., Ltd. * * 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 + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, diff --git a/src/common/nip_addr.h b/src/common/nip_addr.h index a9139b1..905ff82 100644 --- a/src/common/nip_addr.h +++ b/src/common/nip_addr.h @@ -1,16 +1,20 @@ -/* SPDX-License-Identifier: BSD-2-Clause */ +/* SPDX-License-Identifier: BSD-3-Clause */ /* * Copyright (c) 2022 Huawei Device Co., Ltd. * * 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 + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, diff --git a/src/common/nip_checksum.c b/src/common/nip_checksum.c index fdd1d18..b99d527 100644 --- a/src/common/nip_checksum.c +++ b/src/common/nip_checksum.c @@ -1,16 +1,20 @@ -// SPDX-License-Identifier: BSD-2-Clause +// SPDX-License-Identifier: BSD-3-Clause /* * Copyright (c) 2022 Huawei Device Co., Ltd. * * 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 + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, diff --git a/src/common/nip_checksum.h b/src/common/nip_checksum.h index 3dd28f4..c86b07a 100644 --- a/src/common/nip_checksum.h +++ b/src/common/nip_checksum.h @@ -1,16 +1,20 @@ -/* SPDX-License-Identifier: BSD-2-Clause */ +/* SPDX-License-Identifier: BSD-3-Clause */ /* * Copyright (c) 2022 Huawei Device Co., Ltd. * * 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 + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, diff --git a/src/common/nip_hdr.h b/src/common/nip_hdr.h index 3c8ecb3..6b2855b 100644 --- a/src/common/nip_hdr.h +++ b/src/common/nip_hdr.h @@ -1,16 +1,20 @@ -/* SPDX-License-Identifier: BSD-2-Clause */ +/* SPDX-License-Identifier: BSD-3-Clause */ /* * Copyright (c) 2022 Huawei Device Co., Ltd. * * 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 + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, diff --git a/src/common/nip_hdr_decap.c b/src/common/nip_hdr_decap.c index 10b00c9..02f93ec 100644 --- a/src/common/nip_hdr_decap.c +++ b/src/common/nip_hdr_decap.c @@ -1,16 +1,20 @@ -// SPDX-License-Identifier: BSD-2-Clause +// SPDX-License-Identifier: BSD-3-Clause /* * Copyright (c) 2022 Huawei Device Co., Ltd. * * 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 + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, diff --git a/src/common/nip_hdr_encap.c b/src/common/nip_hdr_encap.c index 0928eed..ff5c836 100644 --- a/src/common/nip_hdr_encap.c +++ b/src/common/nip_hdr_encap.c @@ -1,16 +1,20 @@ -// SPDX-License-Identifier: BSD-2-Clause +// SPDX-License-Identifier: BSD-3-Clause /* * Copyright (c) 2022 Huawei Device Co., Ltd. * * 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 + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -- Gitee From 3d4264a42a6ce408d880fd0f086391f24d3b6e31 Mon Sep 17 00:00:00 2001 From: yangyanjun Date: Fri, 30 Sep 2022 17:14:04 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E5=A2=9E=E5=8A=A0newip=E4=BD=BF=E8=83=BD?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=EF=BC=8CAF=5FNINET=E6=9F=A5=E8=AF=A2demo?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangyanjun --- examples/Makefile | 10 ++++- examples/check_nip_enable.c | 78 +++++++++++++++++++++++++++++++++++++ examples/get_af_ninet.c | 77 ++++++++++++++++++++++++++++++++++++ 3 files changed, 163 insertions(+), 2 deletions(-) create mode 100644 examples/check_nip_enable.c create mode 100644 examples/get_af_ninet.c diff --git a/examples/Makefile b/examples/Makefile index 3952330..41d6213 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,4 +1,4 @@ -# SPDX-License-Identifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-3-Clause # # Copyright (c) 2022 Huawei Device Co., Ltd. # @@ -8,7 +8,7 @@ CC=gcc # CC = arm-linux-gnueabi-gcc CFLAGS=-pthread -static -g -UT_LIST = nip_addr_cfg_demo nip_route_cfg_demo nip_tcp_server_demo nip_tcp_client_demo nip_udp_server_demo nip_udp_client_demo +UT_LIST = nip_addr_cfg_demo nip_route_cfg_demo nip_tcp_server_demo nip_tcp_client_demo nip_udp_server_demo nip_udp_client_demo get_af_ninet check_nip_enable all: $(UT_LIST) @@ -46,3 +46,9 @@ nip_udp_server_demo: nip_udp_server_demo.c $(NIP_LIB) nip_udp_client_demo: nip_udp_client_demo.c $(NIP_LIB) $(CC) $(CFLAGS) -o nip_udp_client_demo nip_udp_client_demo.c $(NIP_DEF_LIB) + +get_af_ninet: get_af_ninet.c + $(CC) $(CFLAGS) -o get_af_ninet get_af_ninet.c + +check_nip_enable: check_nip_enable.c + $(CC) $(CFLAGS) -o check_nip_enable check_nip_enable.c diff --git a/examples/check_nip_enable.c b/examples/check_nip_enable.c new file mode 100644 index 0000000..3f96b30 --- /dev/null +++ b/examples/check_nip_enable.c @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. + */ +#include +#include +#include +#include +#include + +#define NIP_DISABLE_PATH ("/sys/module/newip/parameters/disable") +#define NIP_DISABLE_LENTH (5) +#define NIP_ENABLE_INVALID (0xFF) + +int g_nip_enable = NIP_ENABLE_INVALID; + +void _check_nip_enable(void) +{ + char tmp[NIP_DISABLE_LENTH]; + FILE *fn = fopen(NIP_DISABLE_PATH, "r"); + + if (!fn) { + printf("fail to open %s.\n\n", NIP_DISABLE_PATH); + return; + } + + if (fgets(tmp, NIP_DISABLE_LENTH, fn) == NULL) { + printf("fail to gets %s.\n\n", NIP_DISABLE_PATH); + fclose(fn); + return; + } + + fclose(fn); + g_nip_enable = atoi(tmp) ? 0 : 1; +} + +int check_nip_enable(void) +{ + if (g_nip_enable == NIP_ENABLE_INVALID) + _check_nip_enable(); + + return g_nip_enable; +} + +int main(int argc, char **argv) +{ + int af_ninet = check_nip_enable(); + + printf("nip_enable=%d\n\n", g_nip_enable); + return 0; +} + diff --git a/examples/get_af_ninet.c b/examples/get_af_ninet.c new file mode 100644 index 0000000..d245f2d --- /dev/null +++ b/examples/get_af_ninet.c @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. + */ +#include +#include +#include +#include +#include + +#define AF_NINET_PATH ("/sys/module/newip/parameters/af_ninet") +#define AF_NINET_LENTH (5) + +int g_af_ninet; + +void _get_af_ninet(void) +{ + char tmp[AF_NINET_LENTH]; + FILE *fn = fopen(AF_NINET_PATH, "r"); + + if (!fn) { + printf("fail to open %s.\n\n", AF_NINET_PATH); + return; + } + + if (fgets(tmp, AF_NINET_LENTH, fn) == NULL) { + printf("fail to gets %s.\n\n", AF_NINET_PATH); + fclose(fn); + return; + } + + fclose(fn); + g_af_ninet = atoi(tmp); +} + +int get_af_ninet(void) +{ + if (g_af_ninet == 0) + _get_af_ninet(); + + return g_af_ninet; +} + +int main(int argc, char **argv) +{ + int af_ninet = get_af_ninet(); + + printf("af_ninet=%d\n\n", g_af_ninet); + return 0; +} + -- Gitee From a4d6679c7e10e82b85b7af5910213f6586fec908 Mon Sep 17 00:00:00 2001 From: yangyanjun Date: Fri, 30 Sep 2022 17:20:32 +0800 Subject: [PATCH 09/10] =?UTF-8?q?OAT=E6=96=87=E4=BB=B6=E5=90=8D=E6=8B=BC?= =?UTF-8?q?=E5=86=99=E9=94=99=E8=AF=AF=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangyanjun --- OAT.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OAT.xml b/OAT.xml index 330d4ea..d986074 100644 --- a/OAT.xml +++ b/OAT.xml @@ -71,7 +71,7 @@ Note:If the text contains special characters, please escape them according to th - + -- Gitee From db12d0f7ce25b660fa3473823500461fddde2c9f Mon Sep 17 00:00:00 2001 From: yangyanjun Date: Sun, 9 Oct 2022 14:36:33 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BB=BB=E6=84=8F?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=EF=BC=8C=E8=B7=AF=E7=94=B1=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangyanjun --- examples/Makefile | 8 +- examples/nip.h | 14 ++++ examples/nip_addr.c | 137 ++++++++++++++++++++++++++++++++++ examples/nip_lib.c | 84 +++++++++++++++++++++ examples/nip_lib.h | 8 ++ examples/nip_route.c | 172 +++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 422 insertions(+), 1 deletion(-) create mode 100644 examples/nip_addr.c create mode 100644 examples/nip_route.c diff --git a/examples/Makefile b/examples/Makefile index 41d6213..b67dfdb 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -8,7 +8,7 @@ CC=gcc # CC = arm-linux-gnueabi-gcc CFLAGS=-pthread -static -g -UT_LIST = nip_addr_cfg_demo nip_route_cfg_demo nip_tcp_server_demo nip_tcp_client_demo nip_udp_server_demo nip_udp_client_demo get_af_ninet check_nip_enable +UT_LIST = nip_addr_cfg_demo nip_route_cfg_demo nip_tcp_server_demo nip_tcp_client_demo nip_udp_server_demo nip_udp_client_demo get_af_ninet check_nip_enable nip_addr nip_route all: $(UT_LIST) @@ -52,3 +52,9 @@ get_af_ninet: get_af_ninet.c check_nip_enable: check_nip_enable.c $(CC) $(CFLAGS) -o check_nip_enable check_nip_enable.c + +nip_addr: nip_addr.c $(NIP_LIB) + $(CC) $(CFLAGS) -o nip_addr nip_addr.c $(NIP_DEF_LIB) + +nip_route: nip_route.c $(NIP_LIB) + $(CC) $(CFLAGS) -o nip_route nip_route.c $(NIP_DEF_LIB) \ No newline at end of file diff --git a/examples/nip.h b/examples/nip.h index 773e069..06d5da9 100644 --- a/examples/nip.h +++ b/examples/nip.h @@ -45,6 +45,20 @@ #define NIP_ADDR_BIT_LEN_40 40 #define NIP_ADDR_BIT_LEN_MAX 64 +enum nip_addr_check_value { + ADDR_FIRST_DC = 0xDC, + ADDR_FIRST_F0 = 0xF0, + ADDR_FIRST_F1, + ADDR_FIRST_F2, + ADDR_FIRST_F3, + ADDR_FIRST_FE = 0xFE, + ADDR_FIRST_FF = 0xFF, + ADDR_SECOND_MIN_DD = 0xDD, + ADDR_SECOND_MIN_F1 = 0x14, /* f1 14 00 */ + ADDR_THIRD_MIN_F2 = 0x01, /* f2 00 01 00 00 */ + ADDR_THIRD_MIN_F3 = 0x01, /* F3 0001 0000 0000 */ +}; + enum nip_8bit_addr_index { NIP_8BIT_ADDR_INDEX_0 = 0, NIP_8BIT_ADDR_INDEX_1 = 1, diff --git a/examples/nip_addr.c b/examples/nip_addr.c new file mode 100644 index 0000000..b6aa8a5 --- /dev/null +++ b/examples/nip_addr.c @@ -0,0 +1,137 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. + */ +#include +#include +#include +#include +#include +#include +#include + +#include "nip_uapi.h" +#include "nip_lib.h" + +/* get ifindex based on the device name + * struct ifreq ifr; + * struct nip_ifreq ifrn; + * ioctl(fd, SIOGIFINDEX, &ifr); + * ifr.ifr_ifindex; ===> ifindex + */ +int32_t nip_add_addr(int32_t ifindex, struct nip_addr *addr, int opt) +{ + int fd, ret; + struct nip_ifreq ifrn; + + fd = socket(AF_NINET, SOCK_DGRAM, 0); + if (fd < 0) + return -1; + + memset(&ifrn, 0, sizeof(ifrn)); + ifrn.ifrn_addr = *addr; + ifrn.ifrn_ifindex = ifindex; + + ret = ioctl(fd, opt, &ifrn); + if (ret < 0 && errno != EEXIST) { // ignore File Exists error + printf("cfg newip addr fail, ifindex=%d, opt=%u, ret=%d.\n", ifindex, opt, ret); + close(fd); + return -1; + } + + close(fd); + return 0; +} + +void cmd_help(void) +{ + /* nip_addr wlan0 add 01 (在wlan0上配置地址01) */ + /* nip_addr wlan0 del 01 (在wlan0上删除地址01) */ + printf("[cmd example] nip_addr { add | del } \n"); +} + +int main(int argc, char **argv_input) +{ + int ret; + int opt; + int ifindex = 0; + char **argv = argv_input; + char cmd[ARRAY_LEN]; + char dev[ARRAY_LEN]; + struct nip_addr addr = {0}; + + if (argc != DEMO_INPUT_3) { + printf("unsupport addr cfg input, argc=%u.\n", argc); + cmd_help(); + return -1; + } + + /* 配置参数1解析: */ + argv++; + memset(dev, 0, ARRAY_LEN); + ret = sscanf(*argv, "%s", dev); + if (strncmp(dev, "wlan", NAME_WLAN_LEN) && strncmp(dev, "eth", NAME_ETH_LEN)) { + printf("unsupport addr cfg cmd-1, cmd=%s.\n", dev); + cmd_help(); + return -1; + } + ret = nip_get_ifindex(dev, &ifindex); + if (ret != 0) + return -1; + + /* 配置参数2解析: { add | del } */ + argv++; + memset(cmd, 0, ARRAY_LEN); + ret = sscanf(*argv, "%s", cmd); + if (!strncmp(cmd, "add", NAME_WLAN_LEN)) { + opt = SIOCSIFADDR; + } else if (!strncmp(cmd, "del", NAME_WLAN_LEN)) { + opt = SIOCDIFADDR; + } else { + printf("unsupport addr cfg cmd-2, cmd=%s.\n", cmd); + cmd_help(); + return -1; + } + + /* 配置参数3解析: */ + argv++; + if (nip_get_addr(argv, &addr)) { + printf("unsupport addr cfg cmd-3.\n"); + cmd_help(); + return 1; + } + + ret = nip_add_addr(ifindex, &addr, opt); + if (ret != 0) + return -1; + + printf("%s (ifindex=%u) cfg addr success.\n", dev, ifindex); + return 0; +} + diff --git a/examples/nip_lib.c b/examples/nip_lib.c index ffad1c9..8699228 100644 --- a/examples/nip_lib.c +++ b/examples/nip_lib.c @@ -39,6 +39,10 @@ #include "nip_uapi.h" #include "nip_lib.h" +#define ADDR_STR_LEN 2 +#define STR_FMT_1 55 +#define STR_FMT_2 87 + int32_t nip_get_ifindex(const char *ifname, int *ifindex) { int fd; @@ -63,3 +67,83 @@ int32_t nip_get_ifindex(const char *ifname, int *ifindex) return 0; } +int nip_addr_fmt(char *addr, struct nip_addr *sap, int addrlen_input) +{ + unsigned char first_byte; + int addrlen, i; + + memset(sap, 0, sizeof(struct nip_addr)); + for (i = 0; i < INDEX_MAX; i++) { + /* 0 ~ 9 = 48 ~ 57, '0'构造成 0 = 48 - 48 */ + if (addr[i] >= '0' && addr[i] <= '9') + addr[i] = addr[i] - '0'; + /* A ~ F = 65 ~ 70, 'A'构造成 10 = 65 - 55 */ + else if (addr[i] >= 'A' && addr[i] <= 'F') + addr[i] = addr[i] - STR_FMT_1; + /* a ~ f = 97 ~ 102, 'a'构造成 10 = 97 - 87 */ + else if (addr[i] >= 'a' && addr[i] <= 'f') + addr[i] = addr[i] - STR_FMT_2; + else if (addr[i] == 0) + break; + + printf("Newip addr error: uaddr[%u]=%c.\n", i, addr[i]); + return 1; + } + + first_byte = addr[0] << NIP_ADDR_LEN_4; + first_byte += addr[1]; + if (first_byte >= 0x00 && first_byte <= ADDR_FIRST_DC) + addrlen = NIP_ADDR_LEN_1; + else if ((first_byte > ADDR_FIRST_DC && first_byte <= ADDR_FIRST_F0) || + (first_byte == ADDR_FIRST_FF)) + addrlen = NIP_ADDR_LEN_2; + else if (first_byte == ADDR_FIRST_F1) + addrlen = NIP_ADDR_LEN_3; + else if (first_byte == ADDR_FIRST_F2) + addrlen = NIP_ADDR_LEN_5; + else if (first_byte == ADDR_FIRST_F3) + addrlen = NIP_ADDR_LEN_7; + else if (first_byte == ADDR_FIRST_FE) + addrlen = NIP_ADDR_LEN_8; + else + addrlen = 0; + + if (addrlen_input != addrlen) { + printf("Newip addr error, first_byte=0x%x.\n", first_byte); + return 1; + } + + sap->bitlen = addrlen * NIP_ADDR_LEN_8; + printf("*************************************************\n"); + printf("Newip addr len=%u\n", addrlen); + for (i = 0; i < addrlen; i++) { + sap->nip_addr_field8[i] = addr[i * INDEX_2] << INDEX_4; + sap->nip_addr_field8[i] += addr[i * INDEX_2 + 1]; + printf("%02x ", sap->nip_addr_field8[i]); + } + printf("\n*************************************************\n\n"); + + return 0; +} + +int nip_get_addr(char **args, struct nip_addr *addr) +{ + int ret; + char *sp = *args; + int addrlen_input = 0; + __u8 addr[INDEX_MAX] = {0}; + + while (*sp != '\0') { + addrlen_input += 1; + sp++; + } + + if (addrlen_input % ADDR_STR_LEN != 0) { + printf("NewIP addr str-len invalid, addrlen_input=%u.\n", addrlen_input); + return -1; + } + + ret = sscanf(*args, "%s", addr); + return nip_addr_fmt(addr, addr, addrlen_input / ADDR_STR_LEN); +} + diff --git a/examples/nip_lib.h b/examples/nip_lib.h index c324f4d..a32dfe7 100644 --- a/examples/nip_lib.h +++ b/examples/nip_lib.h @@ -35,6 +35,9 @@ #define AF_NINET 45 #define DEMO_INPUT_1 2 /* The DEMO program contains one parameter */ +#define DEMO_INPUT_2 3 +#define DEMO_INPUT_3 4 +#define DEMO_INPUT_4 5 /* Eth0 and wlan0 are optional. Change the value based on the actual interface */ #define NIC_NAME "eth0" @@ -48,6 +51,11 @@ #define TCP_SERVER_PORT 5556 /* TCP Server Port */ #define UDP_SERVER_PORT 9090 /* UDP Server Port */ +#define NAME_WLAN_LEN 4 +#define NAME_ETH_LEN 3 +#define ARRAY_LEN 255 + int nip_get_ifindex(const char *ifname, int *ifindex); +int nip_get_addr(char **args, struct nip_addr *addr); #endif /* _NIP_LIB_H */ diff --git a/examples/nip_route.c b/examples/nip_route.c new file mode 100644 index 0000000..46b9d01 --- /dev/null +++ b/examples/nip_route.c @@ -0,0 +1,172 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * 3. Neither the name of the copyright holder 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. + */ +#include +#include +#include +#include +#include +#include +#include +#include + +#include "nip_uapi.h" +#include "nip_lib.h" +#include "newip_route.h" + +/* get ifindex based on the device name + * struct ifreq ifr; + * struct nip_ifreq ifrn; + * ioctl(fd, SIOGIFINDEX, &ifr); + * ifr.ifr_ifindex; ===> ifindex + */ +int nip_route_add(int ifindex, struct nip_addr *dst_addr, struct nip_addr *gateway_addr, + uint8_t gateway_flag, int opt) +{ + int fd, ret; + struct nip_rtmsg rt; + + fd = socket(AF_NINET, SOCK_DGRAM, 0); + if (fd < 0) + return -1; + + memset(&rt, 0, sizeof(rt)); + rt.rtmsg_ifindex = ifindex; + rt.rtmsg_flags = RTF_UP; + rt.rtmsg_dst = *dst_addr; + + if (gateway_flag) { + rt.rtmsg_gateway = *gateway_addr; + rt.rtmsg_flags |= RTF_GATEWAY; + } + + ret = ioctl(fd, opt, &rt); + if (ret < 0 && errno != EEXIST) { // ignore File Exists error + close(fd); + return -1; + } + + close(fd); + return 0; +} + +void cmd_help(void) +{ + /* nip_route add 02 wlan0 (配置目的地址02设备路由,出口是wlan0) + * nip_route add 02 wlan0 03 (配置目的地址02设备路由,出口是wlan0,网关地址是03) + * nip_route add ff09 wlan0 03 (配置广播默认路由, 出口是wlan0,网关地址是03) + */ + printf("\n[cmd example]\n"); + printf("nip_route { add | del } \n"); + printf("nip_route { add | del } \n"); +} + +int main(int argc, char **argv_input) +{ + int ret; + int opt; + int ifindex = 0; + uint8_t dst_addr_len; + uint8_t gateway_addr_len; + uint8_t gateway_flag = 0; + char **argv = argv_input; + char cmd[ARRAY_LEN]; + char dev[ARRAY_LEN]; + struct nip_addr dst_addr = {0}; + struct nip_addr gateway_addr = {0}; + + if (argc != DEMO_INPUT_3 && argc != DEMO_INPUT_4) { + printf("unsupport route cfg input, argc=%u.\n", argc); + cmd_help(); + return -1; + } + + /* 配置参数1解析: { add | del } */ + argv++; + memset(cmd, 0, ARRAY_LEN); + ret = sscanf(*argv, "%s", cmd); + if (!strncmp(cmd, "add", NAME_WLAN_LEN)) { + opt = SIOCADDRT; + } else if (!strncmp(cmd, "del", NAME_WLAN_LEN)) { + opt = SIOCDELRT; + } else { + printf("unsupport route cfg cmd-1, cmd=%s.\n", cmd); + cmd_help(); + return -1; + } + + /* 配置参数2解析: */ + argv++; + if (nip_get_addr(argv, &dst_addr)) { + printf("unsupport route cfg cmd-2.\n"); + cmd_help(); + return 1; + } + + /* 配置参数3解析: */ + argv++; + memset(dev, 0, ARRAY_LEN); + ret = sscanf(*argv, "%s", dev); + if (strncmp(dev, "wlan", NAME_WLAN_LEN) && strncmp(dev, "eth", NAME_ETH_LEN)) { + printf("unsupport route cfg cmd-3, cmd=%s.\n", dev); + cmd_help(); + return -1; + } + ret = nip_get_ifindex(dev, &ifindex); + if (ret != 0) + return -1; + + /* 配置参数4解析: */ + if (argc == DEMO_INPUT_4) { + argv++; + if (nip_get_addr(argv, &gateway_addr)) { + printf("unsupport route cfg cmd-4.\n"); + cmd_help(); + return 1; + } + gateway_flag = 1; + } + + ret = nip_get_ifindex(dev, &ifindex); + if (ret != 0) { + printf("get %s ifindex fail, ret=%d.\n", dev, ret); + return -1; + } + + ret = nip_route_add(ifindex, &dst_addr, &gateway_addr, gateway_flag, opt); + if (ret != 0) { + printf("get %s ifindex fail, ret=%d.\n", dev, ret); + return -1; + } + + printf("%s (ifindex=%u) cfg route success.\n", dev, ifindex); + return 0; +} + -- Gitee