Date: Sun, 29 Mar 2015 21:48:22 +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: <CADWmZpkeYjuYvGNMDys_Y6UPKHjvafNy2a5RVQ1XuFv9L=_-Yw@mail.gmail.com> In-Reply-To: <CADWmZp=zOJye4-fvie4KrUKR1FKqaL6364RaRCpXAW9DY5SpTQ@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> <CADWmZp=zOJye4-fvie4KrUKR1FKqaL6364RaRCpXAW9DY5SpTQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hi Gábor,
I've submitted the proposal of the libnetstat project on Friday. The
attached PDF version of proposal is just FYI. Any questions or suggestions
please feel free to contact me.
Thanks,
Hao
2015-03-24 23:00 GMT+08:00 Hao Sun <sunhao2013@gmail.com>:
> Hi Gábor,
>
> 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ábor
>>
>> [1] https://wiki.freebsd.org/LibNetstat
>>
>
>
[-- Attachment #2 --]
%PDF-1.5
%
1 0 obj
<< /S /GoTo /D (section.1) >>
endobj
4 0 obj
(Introduction)
endobj
5 0 obj
<< /S /GoTo /D (section.2) >>
endobj
8 0 obj
(Project Goals)
endobj
9 0 obj
<< /S /GoTo /D (subsection.2.1) >>
endobj
12 0 obj
(General Targets)
endobj
13 0 obj
<< /S /GoTo /D (subsection.2.2) >>
endobj
16 0 obj
(``Stretch Goals")
endobj
17 0 obj
<< /S /GoTo /D (subsection.2.3) >>
endobj
20 0 obj
(Deliverables)
endobj
21 0 obj
<< /S /GoTo /D (subsection.2.4) >>
endobj
24 0 obj
(Test Plans)
endobj
25 0 obj
<< /S /GoTo /D (subsection.2.5) >>
endobj
28 0 obj
(Benefits for the FreeBSD Project)
endobj
29 0 obj
<< /S /GoTo /D (section.3) >>
endobj
32 0 obj
(Implementation Details)
endobj
33 0 obj
<< /S /GoTo /D (section.4) >>
endobj
36 0 obj
(Time Schedule)
endobj
37 0 obj
<< /S /GoTo /D (section.5) >>
endobj
40 0 obj
(General Information)
endobj
41 0 obj
<< /S /GoTo /D [42 0 R /Fit] >>
endobj
44 0 obj <<
/Length 443
/Filter /FlateDecode
>>
stream
x}RMo@WqWx̍-B M7A3(mɳ-6BB^4K48GV4k5Ԟ'T"~*+Miߍ?ݱ=Z3ⰴ5ks0lcn_vas/ia
Tk8]1:!6۹2x|2)"9|q*4y`-P&hxծaź
2IzXag!>' vz6uq]Q$VTe5/YyCz$zأEIl"ֹm;Xc'yr4ob5v/WVeL;`arN?Isl3ǐNRTL~S,TW%~>iʚy6Sl"I`'^G
endstream
endobj
42 0 obj <<
/Type /Page
/Contents 44 0 R
/Resources 43 0 R
/MediaBox [0 0 595.276 841.89]
/Parent 51 0 R
>> endobj
45 0 obj <<
/D [42 0 R /XYZ 88.292 778.724 null]
>> endobj
46 0 obj <<
/D [42 0 R /XYZ 89.292 740.862 null]
>> endobj
43 0 obj <<
/Font << /F17 47 0 R /F21 48 0 R /F23 49 0 R /F22 50 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
54 0 obj <<
/Length 1591
/Filter /FlateDecode
>>
stream
xڍWK6Wxzg֊[2dt;=$=p%ˮ.)m ʖ4A $E&||Ûxa)0Maf)8Nߦq0a_IIJ.¸Dɸ.Idq@y}0GZ`FVMN'V(yFeJAV7 e0XS-I`
oo` i.FtWG¤/ʀӚZ
N(OFHlrZU/(R#걽:-#jµ"3)fz8ajqKm
Oį=VXMwjώ` rګfKa83EaZ6F7ŌOZ=sqtoBGV39oǝ!^Ýɴ 22!L!#p=X]1Dekac<6ςK4GlJ_W8\k6\ NװLagF3"`U^D㲃ZyNkF)2 %X-dFI;g:*+<"J
|P&bztu')u[iYf}KZZA*c:(W8ʑU\q; s*d=eeujGctAIp45/RcߩUw[rN^ltBa(Pz29DRnLQ"[NDa[Q#
%w(JLFJdP-"q|.sU9hԨ/Eg;{gFn!AQP&LNp(=2ʋB$7M;0 q?nϾ%hLۑ<"B\R]B{bo#wkU*1/ZVy f7xMsQn*:"|YMA~"͒nƥ9
FKSoйLΫlΊ5f$ ^R%v %.#|r' *XӅXXRWlzeg9CeXt2x
_zj'<
)~yQ8fF[$!Aqպa5q=6.m8LzPz09|`m"n^c͏)vTz#
#ܝ"
),̓ƚGs3O͙"-$lL` ʷ,@)Q>
?Ƿ=jT摥[jn. G̭v6>o9Nߥ['b{ƢݳQ<kZv$BzYLH1nohN꘧(qiwn\"Ùc}tymE<t
ӸGMlHL}q`bÆHPOJޜ
|E4T\\>R0wP>Ę
e9/y~yx/B
endstream
endobj
53 0 obj <<
/Type /Page
/Contents 54 0 R
/Resources 52 0 R
/MediaBox [0 0 595.276 841.89]
/Parent 51 0 R
>> endobj
2 0 obj <<
/D [53 0 R /XYZ 89.292 740.862 null]
>> endobj
6 0 obj <<
/D [53 0 R /XYZ 89.292 576.263 null]
>> endobj
10 0 obj <<
/D [53 0 R /XYZ 89.292 487.604 null]
>> endobj
55 0 obj <<
/D [53 0 R /XYZ 89.292 462.029 null]
>> endobj
56 0 obj <<
/D [53 0 R /XYZ 89.292 384.895 null]
>> endobj
57 0 obj <<
/D [53 0 R /XYZ 89.292 309.621 null]
>> endobj
14 0 obj <<
/D [53 0 R /XYZ 89.292 251.984 null]
>> endobj
58 0 obj <<
/D [53 0 R /XYZ 89.292 188.016 null]
>> endobj
52 0 obj <<
/Font << /F21 48 0 R /F22 50 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
61 0 obj <<
/Length 1417
/Filter /FlateDecode
>>
stream
xڕWK6W(DntҙN3{JzeVKR(Zm^ 7N^*^^6M$EzYʴqG?vNF0o2H|uAovfK0"O2m(H郴Ͱ0+a%ya¬Ҽr>fA$iῑmd/طR,Z>*-Qj@3P$1gZq PN(T&/(V}R4C8_t(J8@TxȠ٧lo'Va!MO~F%6l-L3$uӟƈi#D1ۢ&QKy <|5
DYeGFEymf*hZRת`*4RŅIg
ME9,5rS.m,Ik^j8)89:[g"eFPFxkt_^H7mؤbcvA37ͧ8]Rmyks%FĿ2*Gʯ$9aYmI|,-~<77!@MH&`i>]c֘;k{fALyVާ*v8svw;MjOwzad3tZ#z9r,\]lZr$ 3fMB$O3;x@fB 5[UjBI;Kg
Vdd h5iqZ]%F jQUΈj6<f M=8r[w̺j؏ӹȀv7K&2]wd_ZҲwس^Saf>,-A+ )
/(p]?{@}@soR}(pkV.%Oëu/{FmpmpxSRx9hAg{<Qkv|}"pO,H7W^?m;;{q</! vw4:Z6O
>P |i: VIyy6*RyEr@RO Q
ڔ(M.V ?h->8zْjCsDVf-ܠN5eU9;~ͩw&4M@H6 NڬZ]G,oNR ߛFtT IoMuzSbtTaiLw?'
d@&%Vd~4@R|0\I ɗ)f~77#/x6eu()rJzտ%
endstream
endobj
60 0 obj <<
/Type /Page
/Contents 61 0 R
/Resources 59 0 R
/MediaBox [0 0 595.276 841.89]
/Parent 51 0 R
>> endobj
62 0 obj <<
/D [60 0 R /XYZ 88.292 778.724 null]
>> endobj
63 0 obj <<
/D [60 0 R /XYZ 89.292 740.862 null]
>> endobj
18 0 obj <<
/D [60 0 R /XYZ 89.292 709.189 null]
>> endobj
64 0 obj <<
/D [60 0 R /XYZ 89.292 687.919 null]
>> endobj
65 0 obj <<
/D [60 0 R /XYZ 89.292 657.633 null]
>> endobj
66 0 obj <<
/D [60 0 R /XYZ 89.292 630.335 null]
>> endobj
67 0 obj <<
/D [60 0 R /XYZ 89.292 586.367 null]
>> endobj
22 0 obj <<
/D [60 0 R /XYZ 89.292 547.321 null]
>> endobj
26 0 obj <<
/D [60 0 R /XYZ 89.292 328.003 null]
>> endobj
68 0 obj <<
/D [60 0 R /XYZ 89.292 276.446 null]
>> endobj
59 0 obj <<
/Font << /F22 50 0 R /F21 48 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
71 0 obj <<
/Length 2065
/Filter /FlateDecode
>>
stream
xڥr6]_K! Gˉk"!
K<&