From owner-freebsd-net@FreeBSD.ORG Thu Feb 7 16:13:12 2008 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 720CC16A417 for ; Thu, 7 Feb 2008 16:13:12 +0000 (UTC) (envelope-from tofig@freebsd.az) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.183]) by mx1.freebsd.org (Postfix) with ESMTP id 1557813C469 for ; Thu, 7 Feb 2008 16:13:11 +0000 (UTC) (envelope-from tofig@freebsd.az) Received: by wa-out-1112.google.com with SMTP id k17so4223072waf.3 for ; Thu, 07 Feb 2008 08:13:10 -0800 (PST) Received: by 10.114.195.19 with SMTP id s19mr1495097waf.57.1202399138986; Thu, 07 Feb 2008 07:45:38 -0800 (PST) Received: from ?192.168.1.6? ( [81.21.81.41]) by mx.google.com with ESMTPS id 34sm78162nfu.37.2008.02.07.07.45.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 07 Feb 2008 07:45:37 -0800 (PST) Message-ID: <47AB2798.6010202@freebsd.az> Date: Thu, 07 Feb 2008 19:45:28 +0400 From: Tofig Suleymanov User-Agent: Thunderbird 1.5.0.8 (X11/20061113) MIME-Version: 1.0 To: net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: if_start() and send queue question X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 16:13:12 -0000 Hello list, I will be grateful if someone could point me to the right direction regarding the question below. My device driver is getting incoming packets fine, but for some reason I am not able to send a single packet. Here is the source code: http://www.freebsd.az/if_ib.c I've added several debug messages to the source and here is the output: / /(bringing interface up and assigning the ip/netmask combination) / ifconfig ib0 192.168.0.6 netmask 255.255.255.0 up /(and here is what I get in /var/log/messages /; /it seems to be a standard arp broadcast) / Feb 7 19:14:32 schizo kernel: ib_init entered Feb 7 19:14:32 schizo kernel: ib_start entered Feb 7 19:14:32 schizo kernel: ib_encap entered Feb 7 19:14:32 schizo kernel: DHOST ff ff ff ff ff ff Feb 7 19:14:32 schizo kernel: SHOST 0 c0 ee 22 3 14 Feb 7 19:14:32 schizo kernel: txeof entered Feb 7 19:14:32 schizo kernel: txeof exiting /(now I try pinging, but no joy . I've added extra debug messages inside ping.c) /schizo# ping 192.168.0.1 PING 192.168.0.1 (192.168.0.1): 56 data bytes packets sent: -1 ping: sendto: Invalid argument packets sent: -1 ping: sendto: Invalid argument packets sent: -1 ping: sendto: Invalid argument ^C --- 192.168.0.1 ping statistics --- 3 packets transmitted, 0 packets received, 100% packet loss / I have also tied to add debug messages to sys/net/if.c and sys/net/netisr.c and it seems that the kernel doesn't even try to run my ib_start() function. Any comments are appreciated.