From owner-freebsd-drivers@FreeBSD.ORG Mon Dec 12 04:03:43 2005 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 80A0216A41F for ; Mon, 12 Dec 2005 04:03:43 +0000 (GMT) (envelope-from nsrashmi@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01D3843D69 for ; Mon, 12 Dec 2005 04:03:38 +0000 (GMT) (envelope-from nsrashmi@gmail.com) Received: by wproxy.gmail.com with SMTP id i5so299671wra for ; Sun, 11 Dec 2005 20:03:38 -0800 (PST) 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:content-transfer-encoding:content-disposition; b=QJY3n7/0S27RcdA2qpwdiDa9cNqUK6m6b2ZEOqxjGpIpsqjfh8EuFKcUUz8N16RPK5Pn1yVeu4RRY0kpRDX+rgZLeTLbIwrPTK49naLAp4jM/L93g4GVWkqLPCpatXBWLLgu0Sy11jpFhOrEq+TJMR+OYbmzSRG7AG2k8y2IzDc= Received: by 10.64.241.5 with SMTP id o5mr5394655qbh; Sun, 11 Dec 2005 20:03:37 -0800 (PST) Received: by 10.64.204.16 with HTTP; Sun, 11 Dec 2005 20:03:37 -0800 (PST) Message-ID: <9f9993160512112003i56f25cd6t78533717fec580d1@mail.gmail.com> Date: Mon, 12 Dec 2005 09:33:37 +0530 From: rashmi ns To: freebsd-hackers@freebsd.org, freebsd-drivers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Cc: Subject: Help Reqd: "uiomove" transferring zero bytes from user-kernel space X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2005 04:03:43 -0000 Hello Team, when i use "uiomove" in the character device interface the no of bytes transfrerred between kernel and userspace is zero .but the actual data transferred when trraced through "uio->resid" is correct .can any one explain why this is happening ? /*Character Device Interfaces*/ static struct cdevsw hdlc_cdevsw =3D { .d_maj =3D CDEV_MAJOR, .d_open =3D hdlc_open, .d_read =3D hdlc_read, .d_write =3D hdlc_write, .d_ioctl =3D hdlc_ioctl, .d_close =3D hdlc_close, .d_version =3D D_VERSION, }; static int hdlc_write(dev_t dev, struct uio *uio, int ioflag) { int towrite,written; /*char device inf*/ written=3Duiomove((void *)write_tx_buffer,towrite,uio); uprintf("uio->resid=3D%d",uio->uio_resid); uprintf("No of bytes written =3D%d",written); } Thanks and Regards, Rashmi.N.S From owner-freebsd-drivers@FreeBSD.ORG Mon Dec 12 05:20:58 2005 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AA4216A420 for ; Mon, 12 Dec 2005 05:20:57 +0000 (GMT) (envelope-from nsrashmi@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 342E143D55 for ; Mon, 12 Dec 2005 05:20:57 +0000 (GMT) (envelope-from nsrashmi@gmail.com) Received: by zproxy.gmail.com with SMTP id j2so1333699nzf for ; Sun, 11 Dec 2005 21:20:56 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fQDTIAeIwYXZazwgwsezqKGMVglcbLcblszwjggtq5ldX3rWB8Xqkdgivc4txBaiFTx8C3wbU+ba7ZqEpEMGYD4V3E+V2NgoBpy1Lc+Td3sF7Ol4XutrAm60p14EajMqtzNkeJz/MuLuuvgqD/Smz5AdQTdxWmABwWZG9nw3KR8= Received: by 10.64.253.17 with SMTP id a17mr5400840qbi; Sun, 11 Dec 2005 21:20:56 -0800 (PST) Received: by 10.64.204.16 with HTTP; Sun, 11 Dec 2005 21:20:56 -0800 (PST) Message-ID: <9f9993160512112120g42121d74pb9339971f0b89a61@mail.gmail.com> Date: Mon, 12 Dec 2005 10:50:56 +0530 From: rashmi ns To: freebsd-hackers@freebsd.org, freebsd-drivers@freebsd.org In-Reply-To: <9f9993160512112003i56f25cd6t78533717fec580d1@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <9f9993160512112003i56f25cd6t78533717fec580d1@mail.gmail.com> Cc: Subject: Re: Help Reqd: "uiomove" transferring zero bytes from user-kernel space X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2005 05:20:58 -0000 Sorry , uiomove does not written no of bytes copied from user_space to kernel space or from kernel space to userspace .My understanding was wrong . uiomove returns 0 on success . Regards, Rashmi On 12/12/05, rashmi ns wrote: > Hello Team, > when i use "uiomove" in the character device > interface the no of bytes transfrerred between kernel and userspace is > zero .but the actual data transferred when trraced through > "uio->resid" is correct .can any one explain why this is happening ? > > /*Character Device Interfaces*/ > static struct cdevsw hdlc_cdevsw =3D { > > .d_maj =3D CDEV_MAJOR, > .d_open =3D hdlc_open, > .d_read =3D hdlc_read, > .d_write =3D hdlc_write, > .d_ioctl =3D hdlc_ioctl, > .d_close =3D hdlc_close, > .d_version =3D D_VERSION, > }; > static int hdlc_write(dev_t dev, struct uio *uio, int ioflag) > { > int towrite,written; /*char device inf*/ > written=3Duiomove((void *)write_tx_buffer,towrite,uio); > uprintf("uio->resid=3D%d",uio->uio_resid); > uprintf("No of bytes written =3D%d",written); > > > > > } > > Thanks and Regards, > Rashmi.N.S > From owner-freebsd-drivers@FreeBSD.ORG Tue Dec 13 12:22:01 2005 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 055E316A41F for ; Tue, 13 Dec 2005 12:22:01 +0000 (GMT) (envelope-from nsrashmi@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id E47DC43D5C for ; Tue, 13 Dec 2005 12:21:58 +0000 (GMT) (envelope-from nsrashmi@gmail.com) Received: by wproxy.gmail.com with SMTP id 55so119769wri for ; Tue, 13 Dec 2005 04:21:58 -0800 (PST) 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:content-transfer-encoding:content-disposition; b=lsxlj/AWzdI4n5wC0+LcnVnIBvyw97SxPqoEsTUq1dd2OKpxjEWUWl0SiRmeIVpCliBI7NBk072hbrk6mGcBeUJt5SNenS4Xz2Ycw5+j4wC8p5rnEOulDSGuZDJAaziCKieAp/nLaOPn/ejcI9khYVyuxu3gtl8hANMGLozCAG4= Received: by 10.65.72.10 with SMTP id z10mr546130qbk; Tue, 13 Dec 2005 04:21:58 -0800 (PST) Received: by 10.64.204.16 with HTTP; Tue, 13 Dec 2005 04:21:57 -0800 (PST) Message-ID: <9f9993160512130421m60fe7303l311c13b542544551@mail.gmail.com> Date: Tue, 13 Dec 2005 17:51:57 +0530 From: rashmi ns To: freebsd-hackers@freebsd.org, freebsd-drivers@freebsd.org, freebsd-questions@freebsd.org, bugi@lists.redbrick.dcu.ie MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Cc: Subject: Help reqd: Configuring sppp X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2005 12:22:01 -0000 Hi, I am facing problem in using sppp. Both local system amd remote systems are using the sppp. My questions are 1.Can we use sppp as PPP server? 2.If answer to first question is yes ,how can I do that? I tried out the following commands. $ifconfig hdlc0 up After this command interface is sending LCP-CONF-REQUEST. Also getting the LCP-CONF-ACK from the remote system. Sending and receiving of REQ and ACK is going on ,but after getting ACK sppp is not sending next phase (IPCP) packet to remote system. Pls help me in fixing this.Pls let me know any pointers regarding this. Regards, Rashmi