Results 1 to 6 of 6

Thread: ขอความช่วยเหลือ เกี่ยวกับโปรเจคหน่อยครับ

  1. #1
    Junior Member
    Join Date
    Sep 2008
    Posts
    3


    คือว่า ผมเรียนอยู่ป.ตรีน่ะครับ แล้้วต้องทำโปรเจค ซึ่งต้องสร้าง socket interface สำหรับ protocol ICMPv6 น่ะครับ โดยต้องทำบน OS NetBSD ครับ

    ตอนนี้ถึงขั้นที่ต้อง ออกแบบ API และเขียนแล้วครับ แต่ว่าไม่รู้จะเริ่มอย่างไรครับ คุยกับอาจารย์ที่ปรึกษาก็ไม่เข้าใจครับ (เป็นชาวต่างชาติครับ แกพูดภาษาอังกฤษ เร็วมากๆครับ ฟังไม่รู้เรื่องเลย ")

    จึงอยากจะขอความช่วยเหลือผู้ที่มีความรู้ในด้านนี้หน่อยน่ะครับ

    ขอบคุณครับ

  2. #2
    Junior Member
    Join Date
    Sep 2008
    Posts
    3


    รบกวนท่านใดเก่งภาษาช่วยแปลทีครับ เป็นเมล์ที่ผมถามอาจารย์ไปน่ะครับ อ่านไม่ออกเลย -*-

    Start planning the kernel changes first. You should start by identifying theparts of the UDP implementation (in the kernel) that implement the interface tothe users. Find that, make some notes, identify the functions or datastructures that you think are related to the user/kernel interface andthen come and see me and tell me what you have found.

    While you're doing that, you should also be taking a look at the codethat implements ICMPv6 (for get the IPv4 version for now) just so youhave some idea where it is, and what it is currently able to do.

    | Next could you explain how to design the API to kernel interface ?

    There is actually very little of that to do - you don't really need todesign the interface, it has been designed already - that is the socketsinterface (the standard functions or system calls, and the data structuresthe interface uses) - it has existed for a long time.

    Your job is just to make ICMP (ICMPv6 really, maybe ICMPv4 if you have timenext January or something) use that interface.

    There is (will be) one small design issue, but that is best left untilyou discover the need for it - then working out what to do will befairly easy I think (whereas now, while you don't yet know why it willbe needed, it would just seem impossible)

    | we don't know that how to start it please explain finely.

    Nothing has changed - you need to look at how UDP (that is, sockets of typeSOCK_DGRAM) work (inside the kernel - though you obviously also need toknow what you can do with them in user programs).

    Then we need to make ICMP (ICMPv6) work just the same way (or as similar toit as is reasonable - there will be differences).

    For this, to start (this part you really should have been doing already,before the mid-term) you just need to start reading the NetBSD kernelcode (the networking part of it - UDP is relaly just one source file, plusa header file or two that you can mostly ignore - they're important, butuntil you need the, the details there don't matter too much).

    In that, like in every protocol, there are 3 basic functions - the intefaceto the lower layer (from UDP to IP), the interface to the upper layer(between application, or the kernel socket layer, and UDP), and the actualprotocol processing work (for UDP, that's essentially nothing, as it isa very simple protocol - TCP does lots of stuff in this section).

    For your project, the part that does the interface to the lower layer(from ICMPv6 to IPv6) should already be all there - the kernel alreadysends and receives lots of ICMPv6 messages.

    The protocol processing (or as much of it as your project will ever need)is also already there - the kernel knows how to process the incomingICMPv6 messages that mean things to it, and how to send messages whenrequired (this is stuff that UDP doesn't really do any of).

    However, the interface to the upper layer, for ICMPv6 (and ICMPv4) iscurrently just absent - there is nothing there at all (aside from rawsockets, which is really just an interface directly between IP and theapplication layer, skipping ICMP completely - any ICMP processing isdone as part of the application, that is what we want to change).

    So, you need to look at UDP (the file is src/sys/netinet/udp_usrreq.c - butyou should know that by now already) and try to get an understanding whatis happening there - you don't have to understand everything (or even mostof it) but you need to get an overview of what the various functions do,and how the upper layers manage to find them (you will not find anything in the socket layer which directly calls a UDP function, for example, the socketlayer (which for us, is the application, we do not need to worry about howthe data actually gets from the user program into the kernel - the socketlayer handles all of that for us already) works with any lower layerprotocol (not just IP protocols either, also ISO and appletalk and ....)

    So, you need to know what the protocol needs to provide to allow thesockets layer to find the right functions to call, and what thosefunctions are required to do.

    As soon as you have some idea what this is, we can start creating the equivalent structures for ICMPv6 (data structures and the code toprocess it all) - but it is pointless even thinking that far aheadright now, you still have to learn - and that means you (both of you)need to work (hard) - just because there is no code to write today, andnothing to debug does not mean you have nothing to do - this has neededdoing since (soon after) you started this semester.

    So, look through that code, and try to work out what is happening (thatmeans, reading it, and making notes with questions about parts you do notunderstand, then reading it again - the second time through, some of thedoubtful things will make more sense, because you will have learned more),then read it again, and again, and again ... keep making more notes, makingguesses about what is happening, then see if that all makes sense, correctingyour understanding, over and over again --- and yes, real world softwareengineering (or any engineering) really is this boring -

    when you get more experience it all gets easier, but this is still the way you have to start with anything new. When you have done that (say a week or so from now), send me e-mail to pick a time to come and talk about what you have discovered, and we will see if we can fill in any gaps with what you are understanding. Of course, if you have specific questions you can always send me e-mail any time to ask, or to arrange a time to come and see me.

  3. #3
    Junior Member
    Join Date
    Jan 2010
    Posts
    8


    น้องคะ อาจารย์เค้าอธิบายละเอียดมากกกเลยนะคะ อจ พี่เค้าไม่เห็นพูดอะไรเลย หาmethod Machine Vision กันตาแตกไปเทอมนึง ดีที่ไหวตัวทันมาเปลี่ยนภาษารอดไปได้เอง

    ลองเปิด dict ดูนะคะ ยงอยู่กะ อจ อีกยาว ไม่งันโทรมา คือมันยาว ขี้เกียจพิมพ์อะ

    อ่อ ตอนนี้เรียนโท อินเตอร์ จะจบแล้วอะ ตอนนี้ advisor เป็นอินเดีย สั่งอย่างเดียว กั๊กเด็กไม่ให้จบด้วย เฮ้อ

    น้องไม่รู้เรื่อง ไปหาอจ นะคะ ดูเค้าแคร์น้องมากเลย แต่ตามมารยาท เมลล์ไปนัดแกก่อน ภาษาไม่ต้องเพราะก็ได้ อจ เค้าเข้าใจแหละ ตอนนี้เหมือนให้ทำ special study ไปพลางๆก่อน แต่ก็ scope ให้เยอะพอดูเลยนะ

Similar Threads

  1. Replies: 0
    Last Post: 30-10-2009, 07:26 PM
  2. Replies: 3
    Last Post: 18-10-2008, 01:15 PM
  3. Replies: 8
    Last Post: 01-10-2008, 06:55 PM
  4. Replies: 0
    Last Post: 10-09-2008, 03:01 PM
  5. Replies: 0
    Last Post: 23-08-2007, 02:05 PM

Members who have read this thread : 0

Actions : (View-Readers)

There are no names to display.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •