From owner-freebsd-net@FreeBSD.ORG Wed Mar 17 21:25:29 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE58C1065673; Wed, 17 Mar 2010 21:25:28 +0000 (UTC) (envelope-from gds089@gmail.com) Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mx1.freebsd.org (Postfix) with ESMTP id 3EF908FC0C; Wed, 17 Mar 2010 21:25:27 +0000 (UTC) Received: by bwz8 with SMTP id 8so1520711bwz.3 for ; Wed, 17 Mar 2010 14:25:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=I1Zn6/0AIQE0tzoBl6idSFgJaeqGQ/ennJsCnx77YGA=; b=Ght3YPO/6ElhAfF8Bh++iXDHwL139TGW4CyjWm1UFcb5QmR01fti5ZWPQI2wfkoyiL Tbl5Tsj7P2cekZHctt+kru3CRCpRSqhxSaQB2v7olEjfpuHfm2fdMQJdEWFwObWOuiAY PUU7tZXBBXouP9pvVaOywhK/s5P8rK16vVARg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=AkeTbj0s4ktgXlyaRknVntwOcvOaCu5qmqP2hNlLG5rA9Rs93onpV0m98qBo67YdT9 cUuUt9Li35Ht8ldm2tDb+dKa9svg+l/8BudZ0h1hHeOkTwYPMLmzgzg8IlIQc702C6Dw zrIPpKE3SKu7/da6o4mScq117Vy2ibdGtdMzI= MIME-Version: 1.0 Received: by 10.204.144.86 with SMTP id y22mr1557326bku.43.1268861126836; Wed, 17 Mar 2010 14:25:26 -0700 (PDT) In-Reply-To: References: Date: Thu, 18 Mar 2010 00:25:26 +0300 Message-ID: <9997386c1003171425t44996137wc0e439f6f568248a@mail.gmail.com> From: Saleh Batati To: Juli Mallett Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org, serena zanetta Subject: Re: sscanf in kernel 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: Wed, 17 Mar 2010 21:25:29 -0000 My bad, I thought that I am working on a different mailing list (linux-net)= . -- Saleh On Thu, Mar 18, 2010 at 12:13 AM, Juli Mallett wrote= : > On Wed, Mar 17, 2010 at 13:39, igeek wrote: > > On Mar 17, 2010, at 2:12 PM, serena zanetta wrote: > >> Hi, > >> I need to convert an ascii string in its corresponding hex version (th= e > >> same > >> as sscanf(str,"%02x%02x...",...) does) in the kernel. > > FreeBSD has sscanf in the kernel. See . That said, > sscanf is pretty evil =97 are you sure it's what you want? Are you sure > you need to parse it in the kernel instead of in userland? > > > sscanf() has a kernel version declared in kernel.h. > > http://www.gelato.unsw.edu.au/lxr/source/include/linux/kernel.h#L196 > > I believe you are confused. FreeBSD is not Linux. >