From owner-svn-src-projects@FreeBSD.ORG Fri Aug 6 20:50:48 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6D971065672; Fri, 6 Aug 2010 20:50:48 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ABE508FC1A; Fri, 6 Aug 2010 20:50:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76KomxV028093; Fri, 6 Aug 2010 20:50:48 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76KomCr028091; Fri, 6 Aug 2010 20:50:48 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201008062050.o76KomCr028091@svn.freebsd.org> From: Attilio Rao Date: Fri, 6 Aug 2010 20:50:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210966 - projects/sv/sys/net X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Aug 2010 20:50:48 -0000 Author: attilio Date: Fri Aug 6 20:50:48 2010 New Revision: 210966 URL: http://svn.freebsd.org/changeset/base/210966 Log: Some network functions replicate the behaviour of some network stack functions because they can't trust them. In order to stress out the dependency, improve the relative comments. Modified: projects/sv/sys/net/netdump_client.c Modified: projects/sv/sys/net/netdump_client.c ============================================================================== --- projects/sv/sys/net/netdump_client.c Fri Aug 6 20:48:10 2010 (r210965) +++ projects/sv/sys/net/netdump_client.c Fri Aug 6 20:50:48 2010 (r210966) @@ -699,6 +699,9 @@ retransmit: * Handler for IP packets: checks their sanity and then processes any netdump * ACK packets it finds. * + * It needs to replicate partially the behaviour of ip_input() and + * udp_input(). + * * Parameters: * mb a pointer to an mbuf * containing the packet received * Updates *mb if m_pullup et al change the pointer @@ -707,8 +710,6 @@ retransmit: * Return value: * void */ -/* Bits from sys/netinet/ip_input.c:ip_input, - sys/netinet/udp_usrreq.c:udp_input */ static void nd_handle_ip(struct mbuf **mb) { @@ -886,6 +887,9 @@ nd_handle_ip(struct mbuf **mb) * 1. If the ARP is a request for our IP, respond with our MAC address * 2. If the ARP is a response from our server, record its MAC address * + * It needs to replicate partially the behaviour of arpintr() and + * in_arpinput(). + * * Parameters: * mb a pointer to an mbuf * containing the packet received * Updates *mb if m_pullup et al change the pointer @@ -894,8 +898,6 @@ nd_handle_ip(struct mbuf **mb) * Return value: * void */ -/* Bits from sys/netinet/if_ether.c:arpintr, - sys/netinet/if_ether.c:in_arpinput */ static void nd_handle_arp(struct mbuf **mb) { @@ -1019,6 +1021,9 @@ nd_handle_arp(struct mbuf **mb) * Identifies the packet type (IP or ARP) and passes it along to one of the * helper functions nd_handle_ip or nd_handle_arp. * + * It needs to replicate partially the behaviour of ether_input() and + * ether_demux(). + * * Parameters: * ifp the interface the packet came from (should be nd_nic) * m an mbuf containing the packet received @@ -1026,8 +1031,6 @@ nd_handle_arp(struct mbuf **mb) * Return value: * void */ -/* Bits from sys/net/if_ethersubr.c:ether_input, - sys/net/if_ethersubr.c:ether_demux */ static void netdump_pkt_in(struct ifnet *ifp, struct mbuf *m) {