[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LAN INTERLAYER COMMUNICATION



 

Tarik Alj wrote:

> X-Authentication-Warning: mash.CS.Berkeley.EDU: majrdomo set sender to
[email protected] using -f
> Date: Mon, 14 Feb 2000 19:21:40 +0100
> From: "Jose Juan Iglesias Rebollo" <[email protected]>
> X-Accept-Language: en
> MIME-Version: 1.0
> To: [email protected]
> Subject: LAN INTERLAYER COMMUNICATION
> Content-Transfer-Encoding: 7bit
>
> Dear all,
>
> I'm programing a new NS MAC layer but I don't understand the way packets
> are scheduled to be deliver to the mac layer.
> I saw in ~ns/ll.cc code, the function sendDown(Packet *p) (that I
> suppose to be responsible of delivering packets to mac..., well I'm
> almost sure...):

Actually to the ifq_, wich holds the queueing mecanism

ifq_ is a Queue object pointer. Let's say it's a Queue/DropTail pointer, ok?
DropTail objects contain the dequeue member function. Mac layer must take a packet from that function, right? But the code of this function does not contain any s.schedule call. I know that the scheduler does, but events must be scheduled anywhen... This is my doubt: if the Mac layer gets its packets from ifq_, and LL layer schedules this way: s.schedule(downtarget_,...), where downtarget_ is supposed to be ifq_, what happens with this call to s.schedule?

And what does the scheduler do when we actually pass a NsObjec pointer as a Handler pointer? Does it take any NsObject member function by default? Is this default function recv(Packet *, Handler *)? If so, there´s no discussion since it's the action taken by design.

I need to understand the whole process if I want to know what I am doing.

Thanks.

Jose Juan.
 
 
 

 
>
>     s.schedule(downtarget_, p, delay_);
>
> When we use a NsObject as a Handler, which function is considered to be
> the handler?.
>
> downtarget_  is supposed to be a Queue object, say Drop/Tail... Which
> mac function handles the dequeueing, if any? ~ns/ll.cc says:
>
>     let mac decide when to take a new packet from the queue
>
> ~ns/mac-802_3.cc says:
>
> /*
>    * This function gets called when packets are passed down from the
>     * link layer.
>      */
>     void Mac802_3::recv(Packet *, Handler *)..
>
> I don't understand why and when and how thid function is called... and
> who makes the call!!

The scheduler does...

>
> Thanks in advance...
>
>
> Jose Juan Iglesias Rebollo telecomunication engineer student at Escuela
> Superior de Ingenieros de Sevilla (Spain).

Tarik