From owner-p4-projects@FreeBSD.ORG Fri Aug 14 21:49:25 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9F540106568D; Fri, 14 Aug 2009 21:49:25 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63FA1106568B for ; Fri, 14 Aug 2009 21:49:25 +0000 (UTC) (envelope-from anchie@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3A0F88FC4B for ; Fri, 14 Aug 2009 21:49:25 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n7ELnPPd046475 for ; Fri, 14 Aug 2009 21:49:25 GMT (envelope-from anchie@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n7ELnPoo046473 for perforce@freebsd.org; Fri, 14 Aug 2009 21:49:25 GMT (envelope-from anchie@FreeBSD.org) Date: Fri, 14 Aug 2009 21:49:25 GMT Message-Id: <200908142149.n7ELnPoo046473@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to anchie@FreeBSD.org using -f From: Ana Kukec To: Perforce Change Reviews Cc: Subject: PERFORCE change 167343 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 21:49:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=167343 Change 167343 by anchie@anchie_desnimis on 2009/08/14 21:48:42 Changes in user land in order to process SEND message appended to rt_msghdr instead of rt_ifannouncemsghdr. Affected files ... .. //depot/projects/soc2009/anchie_send/send_0.2/sendd/net.c#22 edit Differences ... ==== //depot/projects/soc2009/anchie_send/send_0.2/sendd/net.c#22 (text+ko) ==== @@ -69,6 +69,7 @@ { struct sbuff *b; + /* 2048 + rt_msghdr */ if ((b = sbuff_alloc(SND_MAX_PKT + sizeof(struct rt_msghdr))) == NULL) { APPLOG_NOMEM(); return (NULL); @@ -139,27 +140,15 @@ pi = (struct snd_packet_info *)(b->head); DBG(&dbg_snd, "Direction, in = %d", pi->in); -#if 0 - ip6 = sbuff_data(b); - DBG(&dbg_snd, "SRC: %s", inet_ntop(AF_INET6, &ip6->ip6_src, abuf, sizeof (abuf))); - DBG(&dbg_snd, "DST: %s", inet_ntop(AF_INET6, &ip6->ip6_dst, abuf, sizeof (abuf))); - struct nd_neighbor_solicit *ns; - struct in6_addr *tgt; - b->data += sizeof (struct ip6_hdr); - ns = (struct nd_neighbor_solicit *)(b->data); - tgt = &ns->nd_ns_target; - DBG(&dbg_snd, "DST: %s", inet_ntop(AF_INET6, tgt, abuf, sizeof (abuf))); -#endif - DBG(&dbg_snd, "rt_msghdr = %d, if_announcemsghdr = %d\n", sizeof (struct rt_msghdr), sizeof (struct if_announcemsghdr)); /* buffer starts with IPv6 hdr, roll back to include rtm header */ -#if 0 b->data -= sizeof (struct rt_msghdr); b->len += sizeof (struct rt_msghdr); -#endif +#if 0 b->data -= sizeof (struct if_announcemsghdr); b->len += sizeof (struct if_announcemsghdr); +#endif DBG(&dbg_snd, "%d bytes on %s", b->len, pi->ifinfo->name); @@ -295,10 +284,10 @@ case RTM_SND_IN: applog(LOG_ERR, "RTM_SND_IN"); /* n = RTM hdr + SEND message */ + if (sbuff_pull(b, sizeof (struct rt_msghdr)) == NULL) { #if 0 - if (sbuff_pull(b, sizeof (struct rt_msghdr)) == NULL) { + if (sbuff_pull(b, sizeof (struct if_announcemsghdr)) == NULL) { #endif - if (sbuff_pull(b, sizeof (struct if_announcemsghdr)) == NULL) { DBG(&dbg_snd, "invalid pkt (not enough for rtm hedaer"); goto done; } @@ -310,10 +299,10 @@ case RTM_SND_OUT: applog(LOG_ERR, "RTM_SND_OUT"); /* n = RTM hdr + ip6_hdr + icmp6len */ + if (sbuff_pull(b, sizeof (struct rt_msghdr)) == NULL) { #if 0 - if (sbuff_pull(b, sizeof (struct rt_msghdr)) == NULL) { + if (sbuff_pull(b, sizeof (struct if_announcemsghdr)) == NULL) { #endif - if (sbuff_pull(b, sizeof (struct if_announcemsghdr)) == NULL) { DBG(&dbg_snd, "invalid pkt (not enough for rtm header"); goto done; }