how to tell device name

I have a network driver that is a producer up of ip packets., so it will be
/dev/io-net/ipX when it is mounted. How can I tell which ip interface I am?
(ip0, ip1, ip2, etc.)?

is this the “endpoint” from io-net registration?
can it ever change once loaded?
“Jay Witherspoon” <spoon@scubadiving.com> wrote in message
news:asg03t$rcm$1@inn.qnx.com

I have a network driver that is a producer up of ip packets., so it will
be
/dev/io-net/ipX when it is mounted. How can I tell which ip interface I
am?
(ip0, ip1, ip2, etc.)?

Yes, and the string part is what you specified as your
top_type.

-seanb

Jay Witherspoon <spoon@scubadiving.com> wrote:

is this the “endpoint” from io-net registration?
can it ever change once loaded?
“Jay Witherspoon” <> spoon@scubadiving.com> > wrote in message
news:asg03t$rcm$> 1@inn.qnx.com> …
I have a network driver that is a producer up of ip packets., so it will
be
/dev/io-net/ipX when it is mounted. How can I tell which ip interface I
am?
(ip0, ip1, ip2, etc.)?

Correct.

-seanb

Jay Witherspoon <spoon@scubadiving.com> wrote:

thanks, and seeing that it is set at registration time, I assume it cannot
change unless I unreg…

“Sean Boudreau” <> seanb@node25.ott.qnx.com> > wrote in message
news:asg6uv$g0r$> 1@nntp.qnx.com> …

Yes, and the string part is what you specified as your
top_type.

-seanb

Jay Witherspoon <> spoon@scubadiving.com> > wrote:
is this the “endpoint” from io-net registration?
can it ever change once loaded?
“Jay Witherspoon” <> spoon@scubadiving.com> > wrote in message
news:asg03t$rcm$> 1@inn.qnx.com> …
I have a network driver that is a producer up of ip packets., so it
will
be
/dev/io-net/ipX when it is mounted. How can I tell which ip interface
I
am?
(ip0, ip1, ip2, etc.)?
\

thanks, and seeing that it is set at registration time, I assume it cannot
change unless I unreg…

“Sean Boudreau” <seanb@node25.ott.qnx.com> wrote in message
news:asg6uv$g0r$1@nntp.qnx.com

Yes, and the string part is what you specified as your
top_type.

-seanb

Jay Witherspoon <> spoon@scubadiving.com> > wrote:
is this the “endpoint” from io-net registration?
can it ever change once loaded?
“Jay Witherspoon” <> spoon@scubadiving.com> > wrote in message
news:asg03t$rcm$> 1@inn.qnx.com> …
I have a network driver that is a producer up of ip packets., so it
will
be
/dev/io-net/ipX when it is mounted. How can I tell which ip interface
I
am?
(ip0, ip1, ip2, etc.)?
\

Jay Witherspoon <spoon@scubadiving.com> wrote in message
news:asgc44$avf$1@inn.qnx.com

thanks, and seeing that it is set at registration time, I assume it cannot
change unless I unreg…

Not 100% sure what you are trying to do, but …

You have the choice to regist multiple time, with different “top_type”, and
then in your code, you can decided “which top_type” the packet belongs to,
and do a tx_up() with that “top_type”'s reg_handle (returned to you during
registration).

-xtang

“Sean Boudreau” <> seanb@node25.ott.qnx.com> > wrote in message
news:asg6uv$g0r$> 1@nntp.qnx.com> …

Yes, and the string part is what you specified as your
top_type.

-seanb

Jay Witherspoon <> spoon@scubadiving.com> > wrote:
is this the “endpoint” from io-net registration?
can it ever change once loaded?
“Jay Witherspoon” <> spoon@scubadiving.com> > wrote in message
news:asg03t$rcm$> 1@inn.qnx.com> …
I have a network driver that is a producer up of ip packets., so it
will
be
/dev/io-net/ipX when it is mounted. How can I tell which ip
interface
I
am?
(ip0, ip1, ip2, etc.)?


\

a related question…

I am using the Tiny TCPIP stack and it appears in some previous code, the
advertise is what makes the network interface visible in /proc/ipstats. Is
that correct?

If yes, I am doing the advertise in my init code, but ip1 is not showing up
in /proc/ipstats… There is a device under /dev/io-net/ip1 and I can
umount it… Since I am creating an advertise packet and sending it, there
is no concept of a return code… How can you tell what is the problem with
your advertise packet?

“Jay Witherspoon” <spoon@scubadiving.com> wrote in message
news:asg03t$rcm$1@inn.qnx.com

I have a network driver that is a producer up of ip packets., so it will
be
/dev/io-net/ipX when it is mounted. How can I tell which ip interface I
am?
(ip0, ip1, ip2, etc.)?

If you’re registering as type “ip” you are on the same level
as the stack. Packets don’t flow sideways, only up and down.

-seanb

Jay Witherspoon <spoon@scubadiving.com> wrote:

a related question…

I am using the Tiny TCPIP stack and it appears in some previous code, the
advertise is what makes the network interface visible in /proc/ipstats. Is
that correct?

If yes, I am doing the advertise in my init code, but ip1 is not showing up
in /proc/ipstats… There is a device under /dev/io-net/ip1 and I can
umount it… Since I am creating an advertise packet and sending it, there
is no concept of a return code… How can you tell what is the problem with
your advertise packet?

“Jay Witherspoon” <> spoon@scubadiving.com> > wrote in message
news:asg03t$rcm$> 1@inn.qnx.com> …
I have a network driver that is a producer up of ip packets., so it will
be
/dev/io-net/ipX when it is mounted. How can I tell which ip interface I
am?
(ip0, ip1, ip2, etc.)?

Even if I change my register to be something different, say “mnc” as the top
binding, after registering, there is only a /dev/io-net/mnc0 present. When
I cat /proc/ipstats, the mnc0 entry does not show up with the other network
interfaces (en0 and lo0). I expected the mnc0 to apprear after
registering…

“Sean Boudreau” <seanb@node25.ott.qnx.com> wrote in message
news:asnmij$95d$1@nntp.qnx.com

If you’re registering as type “ip” you are on the same level
as the stack. Packets don’t flow sideways, only up and down.

-seanb

Jay Witherspoon <> spoon@scubadiving.com> > wrote:
a related question…

I am using the Tiny TCPIP stack and it appears in some previous code,
the
advertise is what makes the network interface visible in /proc/ipstats.
Is
that correct?

If yes, I am doing the advertise in my init code, but ip1 is not showing
up
in /proc/ipstats… There is a device under /dev/io-net/ip1 and I can
umount it… Since I am creating an advertise packet and sending it,
there
is no concept of a return code… How can you tell what is the problem
with
your advertise packet?

“Jay Witherspoon” <> spoon@scubadiving.com> > wrote in message
news:asg03t$rcm$> 1@inn.qnx.com> …
I have a network driver that is a producer up of ip packets., so it
will
be
/dev/io-net/ipX when it is mounted. How can I tell which ip interface
I
am?
(ip0, ip1, ip2, etc.)?
\

That’s because the stack takes ip packtes, not “mnc”. If you register
as type “mnc”, you also need a layer that takes mnc packets on the bottom
and converts them to ip which it spits out at the top (_REG_CONVERTOR).

If your module is actually making ip packets, this converter will simply
pass the packet through, or you can cheat and actually register as
a converter but source packets yourself.

-seanb

Jay Witherspoon <spoon@scubadiving.com> wrote:

Even if I change my register to be something different, say “mnc” as the top
binding, after registering, there is only a /dev/io-net/mnc0 present. When
I cat /proc/ipstats, the mnc0 entry does not show up with the other network
interfaces (en0 and lo0). I expected the mnc0 to apprear after
registering…

“Sean Boudreau” <> seanb@node25.ott.qnx.com> > wrote in message
news:asnmij$95d$> 1@nntp.qnx.com> …

If you’re registering as type “ip” you are on the same level
as the stack. Packets don’t flow sideways, only up and down.

-seanb

Jay Witherspoon <> spoon@scubadiving.com> > wrote:
a related question…

I am using the Tiny TCPIP stack and it appears in some previous code,
the
advertise is what makes the network interface visible in /proc/ipstats.
Is
that correct?

If yes, I am doing the advertise in my init code, but ip1 is not showing
up
in /proc/ipstats… There is a device under /dev/io-net/ip1 and I can
umount it… Since I am creating an advertise packet and sending it,
there
is no concept of a return code… How can you tell what is the problem
with
your advertise packet?

“Jay Witherspoon” <> spoon@scubadiving.com> > wrote in message
news:asg03t$rcm$> 1@inn.qnx.com> …
I have a network driver that is a producer up of ip packets., so it
will
be
/dev/io-net/ipX when it is mounted. How can I tell which ip interface
I
am?
(ip0, ip1, ip2, etc.)?
\

The data we are working with is IP, so can you give me more info on how I
can register as both a converter and an up producer? So, I can end up with
a “mnc” network interface that really is an up producer of IP packets?

“Sean Boudreau” <seanb@node25.ott.qnx.com> wrote in message
news:asqbae$3i$1@nntp.qnx.com

That’s because the stack takes ip packtes, not “mnc”. If you register
as type “mnc”, you also need a layer that takes mnc packets on the bottom
and converts them to ip which it spits out at the top (_REG_CONVERTOR).

If your module is actually making ip packets, this converter will simply
pass the packet through, or you can cheat and actually register as
a converter but source packets yourself.

-seanb

Jay Witherspoon <> spoon@scubadiving.com> > wrote:
Even if I change my register to be something different, say “mnc” as the
top
binding, after registering, there is only a /dev/io-net/mnc0 present.
When
I cat /proc/ipstats, the mnc0 entry does not show up with the other
network
interfaces (en0 and lo0). I expected the mnc0 to apprear after
registering…

“Sean Boudreau” <> seanb@node25.ott.qnx.com> > wrote in message
news:asnmij$95d$> 1@nntp.qnx.com> …

If you’re registering as type “ip” you are on the same level
as the stack. Packets don’t flow sideways, only up and down.

-seanb

Jay Witherspoon <> spoon@scubadiving.com> > wrote:
a related question…

I am using the Tiny TCPIP stack and it appears in some previous code,
the
advertise is what makes the network interface visible in
/proc/ipstats.
Is
that correct?

If yes, I am doing the advertise in my init code, but ip1 is not
showing
up
in /proc/ipstats… There is a device under /dev/io-net/ip1 and I
can
umount it… Since I am creating an advertise packet and sending it,
there
is no concept of a return code… How can you tell what is the
problem
with
your advertise packet?

“Jay Witherspoon” <> spoon@scubadiving.com> > wrote in message
news:asg03t$rcm$> 1@inn.qnx.com> …
I have a network driver that is a producer up of ip packets., so it
will
be
/dev/io-net/ipX when it is mounted. How can I tell which ip
interface
I
am?
(ip0, ip1, ip2, etc.)?


\

As alluded to, the easiest way to get yourself up and running is
to change _REG_PRODUCER → _REG_CONVERTOR with a top_type of “ip”
and a bot_type of “mnc”. This isn’t strictly correct as you aren’t
converting anything, rather sourcing but at least it connects you
below the stack and prevents you from having to write 2 modules.

-seanb

Jay Witherspoon <spoon@scubadiving.com> wrote:

The data we are working with is IP, so can you give me more info on how I
can register as both a converter and an up producer? So, I can end up with
a “mnc” network interface that really is an up producer of IP packets?

“Sean Boudreau” <> seanb@node25.ott.qnx.com> > wrote in message
news:asqbae$3i$> 1@nntp.qnx.com> …

That’s because the stack takes ip packtes, not “mnc”. If you register
as type “mnc”, you also need a layer that takes mnc packets on the bottom
and converts them to ip which it spits out at the top (_REG_CONVERTOR).

If your module is actually making ip packets, this converter will simply
pass the packet through, or you can cheat and actually register as
a converter but source packets yourself.

-seanb

Jay Witherspoon <> spoon@scubadiving.com> > wrote:
Even if I change my register to be something different, say “mnc” as the
top
binding, after registering, there is only a /dev/io-net/mnc0 present.
When
I cat /proc/ipstats, the mnc0 entry does not show up with the other
network
interfaces (en0 and lo0). I expected the mnc0 to apprear after
registering…

“Sean Boudreau” <> seanb@node25.ott.qnx.com> > wrote in message
news:asnmij$95d$> 1@nntp.qnx.com> …

If you’re registering as type “ip” you are on the same level
as the stack. Packets don’t flow sideways, only up and down.

-seanb

Jay Witherspoon <> spoon@scubadiving.com> > wrote:
a related question…

I am using the Tiny TCPIP stack and it appears in some previous code,
the
advertise is what makes the network interface visible in
/proc/ipstats.
Is
that correct?

If yes, I am doing the advertise in my init code, but ip1 is not
showing
up
in /proc/ipstats… There is a device under /dev/io-net/ip1 and I
can
umount it… Since I am creating an advertise packet and sending it,
there
is no concept of a return code… How can you tell what is the
problem
with
your advertise packet?

“Jay Witherspoon” <> spoon@scubadiving.com> > wrote in message
news:asg03t$rcm$> 1@inn.qnx.com> …
I have a network driver that is a producer up of ip packets., so it
will
be
/dev/io-net/ipX when it is mounted. How can I tell which ip
interface
I
am?
(ip0, ip1, ip2, etc.)?


\

Jay Witherspoon <spoon@scubadiving.com> wrote in message
news:asqc5g$mfq$1@inn.qnx.com

The data we are working with is IP, so can you give me more info on how I
can register as both a converter and an up producer? So, I can end up
with
a “mnc” network interface that really is an up producer of IP packets?

Before we throw more detail, could you explain what you are trying to do?

Do you have a specifc hardware, that you want send/receive IP packet ?
Are you trying intercept incomming/outging packet and modified them?
Or is it you have a special layer that you wnat encap/decap IP packets
in/from it ?

-xtang


“Sean Boudreau” <> seanb@node25.ott.qnx.com> > wrote in message
news:asqbae$3i$> 1@nntp.qnx.com> …

That’s because the stack takes ip packtes, not “mnc”. If you register
as type “mnc”, you also need a layer that takes mnc packets on the
bottom
and converts them to ip which it spits out at the top (_REG_CONVERTOR).

If your module is actually making ip packets, this converter will simply
pass the packet through, or you can cheat and actually register as
a converter but source packets yourself.

-seanb

Jay Witherspoon <> spoon@scubadiving.com> > wrote:
Even if I change my register to be something different, say “mnc” as
the
top
binding, after registering, there is only a /dev/io-net/mnc0 present.
When
I cat /proc/ipstats, the mnc0 entry does not show up with the other
network
interfaces (en0 and lo0). I expected the mnc0 to apprear after
registering…

“Sean Boudreau” <> seanb@node25.ott.qnx.com> > wrote in message
news:asnmij$95d$> 1@nntp.qnx.com> …

If you’re registering as type “ip” you are on the same level
as the stack. Packets don’t flow sideways, only up and down.

-seanb

Jay Witherspoon <> spoon@scubadiving.com> > wrote:
a related question…

I am using the Tiny TCPIP stack and it appears in some previous
code,
the
advertise is what makes the network interface visible in
/proc/ipstats.
Is
that correct?

If yes, I am doing the advertise in my init code, but ip1 is not
showing
up
in /proc/ipstats… There is a device under /dev/io-net/ip1 and I
can
umount it… Since I am creating an advertise packet and sending
it,
there
is no concept of a return code… How can you tell what is the
problem
with
your advertise packet?

“Jay Witherspoon” <> spoon@scubadiving.com> > wrote in message
news:asg03t$rcm$> 1@inn.qnx.com> …
I have a network driver that is a producer up of ip packets., so
it
will
be
/dev/io-net/ipX when it is mounted. How can I tell which ip
interface
I
am?
(ip0, ip1, ip2, etc.)?




\