From owner-freebsd-hackers@freebsd.org Fri Oct 2 16:32:26 2015 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA801A0EAEE; Fri, 2 Oct 2015 16:32:26 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 88DAC1C67; Fri, 2 Oct 2015 16:32:26 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iofh134 with SMTP id h134so126067102iof.0; Fri, 02 Oct 2015 09:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=HDSgyYvcM5zEyW+SKp9k5CKXsps2qBaVBnM8Dwj7cBM=; b=FYbsF1B7BZyAH+hTnCILfgNVllil/L3a+EjgA1BmrbWOMV95u+xcByJb+nZCtYbVPY vWVCn/hvXL8ApccbGy7YtIBupW2qUUDVutWWr3qeLQ7RselfYLpsEv/SkxzuuZy7+jrE ke2EGnhtoW9T/3Py7jRUJ47Hk/jkxP/e2GcJcThsZKcu8kfGZNDdrJWIgkEeMyUq6VOF 29RKzMIeqKnSBaoYfbIKxs5KppuSsaiQ3v5anXPJKjFn27Q49kAfAd1N/aqlYE+a7ASu fuGBP7rsoRDapg5s2U/kzqulkzw3NMB6z9kcxvRwUqtJP45OX5XOpOyXGh00lZkIhzqx u0Dg== MIME-Version: 1.0 X-Received: by 10.107.35.78 with SMTP id j75mr16744916ioj.123.1443803545994; Fri, 02 Oct 2015 09:32:25 -0700 (PDT) Received: by 10.36.46.15 with HTTP; Fri, 2 Oct 2015 09:32:25 -0700 (PDT) In-Reply-To: References: <560E06FA.3020702@freebsd.org> Date: Fri, 2 Oct 2015 09:32:25 -0700 Message-ID: Subject: Re: LibCURL in Kernel From: Adrian Chadd To: Rakshith Venkatesh Cc: Julian Elischer , FreeBSD Filesystems , "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Fri, 02 Oct 2015 16:45:49 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Oct 2015 16:32:26 -0000 I tried this a long time ago (don't ask.) The biggest gotchas: * the socket code wasn't as nice to use from kernel land as it is today; and * the existing http libraries out there mostly expect you have infinite stack space, which in kernel land you don't. :( I eventually had the company allow me to write my own thin HTTP client layer in kernel space to do it, because trying to leverage an existing one ended up causing constant panics due to the stack space thing. -adrian On 1 October 2015 at 22:25, Rakshith Venkatesh wrote: > I am actually not looking for full curl functionality. My aim is to back up > data from native file system to a s3 backend from kernel. I have a very > thin userspace where its not straight forward to deploy apps.I saw libs3 > and most of the already existing utilities use libcurl library to send Http > requests. > On 02-Oct-2015 9:54 am, "Julian Elischer" wrote: > >> On 10/2/15 12:29 AM, Rakshith Venkatesh wrote: >> >>> Hi, >>> >>> I wanted to know if there is any library which does the job of libCURL in >>> FreeBSD kernel. I know libCURL is a user-space library but was looking for >>> something similar in kernel. Porting is one option but i think it surely >>> will not be a straight forward thing. >>> >>> Any leads on the above query would be great! >>> >> >> there was work to write an http daemon using netgraph.. >> I know that's the opposite side of the same transfer but it does poitn to >> how it could be done. >> All the hooks are in place to allow one to write a netgraph node that can >> attach to netgraph socket nodes. >> what you would do with the data when you get it is a different thing.. >> >> tell us a bit more about your requirements. >> >> >>> >>> Thanks, >>> >>> Rakshith >>> _______________________________________________ >>> freebsd-hackers@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers >>> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org >>> " >>> >>> >> > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"