Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Feb 1995 16:56:09 +0200
From:      Marko Kohtala <mkohtala@snakemail.hut.fi>
To:        freebsd-questions@freefall.cdrom.com
Cc:        ohtroute@niksula.hut.fi
Subject:   if_output parameter lifetimes
Message-ID:  <199502221456.QAA08396@lk-hp-19.hut.fi>

next in thread | raw e-mail | index | archive | help
How long do the parameters for the network interface output function
live?

The function looks a bit like this:

if_output(struct ifnet *ifp,
          struct mbuf *m,
          struct sockaddr *dst,
          struct rtentry *rt)

We are in a process of writing some priorization to the queueing of
outgoing network packets.

Currently we have it planned such that we put our queueing code in
between ip_output and the interface if_output function. This code
limits the amount of badwidth used on the interface to collect some
queue where we can prioritize the outgoing packets.

When it is estimated that the interface should be able to send a
packet, the if_output function is called to transmit the packet with
highest priority.

What is unclear is that what data is still valid at the time we
finally make the call to if_output.

mbuf - is still there

dst - we make a copy of it

ifp - I guess the ifnet structure pointed to by ifp will not be
removed but it could be made inactive in the mean time?

rt - I've noticed that there is a reference count field and that for
ARP the expire time is set to something. I however lack the knowledge
of how these interfere with the rest of the networking code and if and
how I can use them.

Any help appreciated. Thanks.

-- 
---
Marko.Kohtala@hut.fi, Marko.Kohtala@compart.fi, Marko.Kohtala@ntc.nokia.com
Student at (not representative of) the Helsinki University of Technology
(This is an information virus: if you know of it, you are infected.)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199502221456.QAA08396>