From owner-freebsd-net@FreeBSD.ORG Thu Oct 26 23:43:18 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C16AD16A407 for ; Thu, 26 Oct 2006 23:43:18 +0000 (UTC) (envelope-from smw2010@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 383B043D55 for ; Thu, 26 Oct 2006 23:43:18 +0000 (GMT) (envelope-from smw2010@gmail.com) Received: by nz-out-0102.google.com with SMTP id o37so442521nzf for ; Thu, 26 Oct 2006 16:43:17 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=B9PAH2x1SEgOp950A6foclq3cL/TbOvE3Jarvz2PUyUJlaGJq1NUOW8h3U7NVgoKTGf1iKxJ9vkktjfPvv+DPKy15j9NI1AhqE2bUW5hA48SKR7bQOuZtLzORakB+03e95ZUVpbo4m5an3hO8XkQwPbNf0NPLV0mrVU6n4TCUCc= Received: by 10.65.38.13 with SMTP id q13mr4036115qbj; Thu, 26 Oct 2006 16:43:17 -0700 (PDT) Received: by 10.65.241.10 with HTTP; Thu, 26 Oct 2006 16:43:17 -0700 (PDT) Message-ID: Date: Fri, 27 Oct 2006 09:43:17 +1000 From: "Sam Wun" To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: check internet connection 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, 26 Oct 2006 23:43:18 -0000 Hi, I want to write a C program to check freebsd's internet connection. What s the best way to achieve this checking in layer 2 or 3 of the tcp/ip stacks in freebsd? Thanks S