Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 2015 23:00:53 +0800
From:      Hao Sun <sunhao2013@gmail.com>
To:        Gabor Pali <pgj@freebsd.org>
Cc:        George Neville-Neil <gnn@freebsd.org>, Robert Watson <rwatson@freebsd.org>, freebsd-hackers@freebsd.org
Subject:   Re: Self introduciton of Hao Sun and thoughts on LibNetstat
Message-ID:  <CADWmZp=zOJye4-fvie4KrUKR1FKqaL6364RaRCpXAW9DY5SpTQ@mail.gmail.com>
In-Reply-To: <CAHnG2Cxs%2BdPNEpnk%2BUJecuo0QDndDgwyE0QAn%2BMjt4AL7ZaYpA@mail.gmail.com>
References:  <CADWmZpmq7aVxk5bap-ConjKesnmVZuEm0S9Nn%2Bwt6guc-GyfgA@mail.gmail.com> <CAHnG2CyPWsi2VghASzgMqGHpMoMsMnE1w6eCxtsxmEmeCd28JQ@mail.gmail.com> <CADWmZpnOrJahwBWJOTG6RRkr6hanZR9iYZkufuAcHiOHnOYWqg@mail.gmail.com> <CAHnG2Cxs%2BdPNEpnk%2BUJecuo0QDndDgwyE0QAn%2BMjt4AL7ZaYpA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi G=C3=A1bor,

Thanks a lot for the advice and suggestions. Based on our discusstion and
initial investigation, I roughly draw a route map for the LibNetstat of
GSoC. I'd like to follow the following process to get down to more details
from requirement to implementation.

0. Warm up. I'll build the FreeBSD, just as your suggestion, the "world"
version, and then install the system together with setting up the dev
environment. Hopefully after this step I'll get familar with the FreeBSD
dev process and be well prepared for the next steps.

1. Requirement gathering. The main task of our project is to create wrapper
libraries to support monitoring and management applications to avoid direct
use of kvm(3) and sysctl(3) interfaces. In this step, I plan to read
the kvm(3) and sysctl(3) implementations and filter out the interfaces and
functions which are related to networks. Then I'll classify all the
requirements in order to get different modules of the LibNetstat. After
this step, I should have a vague idea about creating the abstactions for
the modules.

2. Case study. In this step, I want to learn about the Libmemstat(3) and
existing LibNetstat implementations in order to get inspirations and
reuseable code snippets. After the case study, hopefully I'll be cleared
how to make the abstraction.

3. Create abstraction. After Step #2 and #3, I'll start to write code from
sketch and the interfaces should be well defined after this step.

4. Core implementation. Based on the kvm(3) and sysctl(3), I'll create the
detailed implementation for the library.

5. Applications update preparation. Now our library is ready! In this step
I'd like to read the implemation of netstat(1) and bsnmpd(1) and point out
which part could be replaced with our new library.

6. Applications update. Update the netstat(1) and bsnmpd(1), also test the
new library.

7. Documentation. Maybe we need to create a manual page for the library.

The above are my initial ideas. I'd like to dive into each step during the
next few days and add more details in my final proposal. Also I plan add
some buffer time in case there is a unexpected delay and some "stretch
goals" in case the abrove goals are done quickly :).

I also feel excited to corporate and share my ideas with you, Robert
and George. Any suggestions or supplements are really welcomed :)

Thanks,
Hao

2015-03-23 14:50 GMT+08:00 Gabor Pali <pgj@freebsd.org>:

> Hi Hao,
>
> 2015-03-22 13:09 GMT+01:00 Hao Sun <sunhao2013@gmail.com>:
> > Following your guidance, I've cloned the FreeBSD mirror from GitHub and
> will get down to
> > have an initial scratch with the latest version.
>
> That is great.  I forgot to mention, but maybe it is also said on the
> introductory wiki pages you have also cited originally, that it is
> probably the best if you try to build the userland ("world") and the
> kernel on your VM and install it first.  This should give you the
> basic feel for the development cycle and help to spot problems with
> the clean system itself before you start hacking on it.  The
> development branch of FreeBSD (that is called "current") shall build
> and install just fine for most of the time, but do not be discouraged
> if not, ask for help.
>
> > On the project's wiki page [1], I think the target for GSoC
> > 2015 is to finish the tasks haven't been done in the following table.
> But according to your
> > comments in the emails, it seems like I need to start the job from
> scratch. Thus the question
> > is should I keep the existing code and add new features to the previous
> version or just start
> > the project from the very beginning?
>
> I might have sounded a bit pessimistic, I do not necessarily insist on
> rewriting the entire library :-)  I think it is just common sense:
> study the current implementation, take a look at the FreeBSD ecosystem
> and kernel, discuss the topic with the interested hackers, and work
> out your proposal based on your findings.  You may find some of the
> old code base and concepts reusable, which is excellent, and you may
> decide to take another approach for the rest.  It might be worthwhile
> to accommodate some "stretch goals" in your proposal if you
> accidentally completed your summer task too quickly :-)
>
> For making things a bit easier (hopefully) for you, I may also include
> George Neville-Neil in the conversation (see him CC'ed) who has shown
> some interest in driving this library into the base system in the past
> if I recall correctly.  Along with Robert, he is also a high-profile
> src committer, with experience in networking and related areas.  (And
> also a potential mentor for this project as well?)
>
> Cheers,
> G=C3=A1bor
>
> [1] https://wiki.freebsd.org/LibNetstat
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADWmZp=zOJye4-fvie4KrUKR1FKqaL6364RaRCpXAW9DY5SpTQ>