How to check from C code for network PCMCIA card in

Hi.

I would like to check from C code if the network PCMCIA card is plug in on a
laptop. How is this done?

I noticed that when I run ‘netinfo -l’, it knows if the network PCMCIA card
is in or not. How does ‘netinfo -l’ work?

Thanks

Augie

Augie Henriques <augiehenriques@hotmail.com> wrote:

Hi.

I would like to check from C code if the network PCMCIA card is plug in on a
laptop. How is this done?

You could parse the output from popen(“pin”).

I noticed that when I run ‘netinfo -l’, it knows if the network PCMCIA card
is in or not. How does ‘netinfo -l’ work?

It sends private messages to Net.

-David

David Gibbs <dagibbs@qnx.com> wrote in message
news:91bc8d$ckl$6@nntp.qnx.com

Augie Henriques <> augiehenriques@hotmail.com> > wrote:
Hi.

I would like to check from C code if the network PCMCIA card is plug in
on a
laptop. How is this done?

You could parse the output from popen(“pin”).

I don’t like this approach -:(.

I noticed that when I run ‘netinfo -l’, it knows if the network PCMCIA
card
is in or not. How does ‘netinfo -l’ work?

It sends private messages to Net.

Yes. I sent a message to Net to get the MAC address. Net always returns
the MAC address even when the network PCMCIA card is not in. I would like
to send Net a message, to find out if the network card is in or not. How do
I do this?

-David

Thanks

Augie

Augie Henriques <augiehenriques@hotmail.com> wrote:

David Gibbs <> dagibbs@qnx.com> > wrote in message
news:91bc8d$ckl$> 6@nntp.qnx.com> …
Augie Henriques <> augiehenriques@hotmail.com> > wrote:
Hi.

I would like to check from C code if the network PCMCIA card is plug in
on a
laptop. How is this done?

You could parse the output from popen(“pin”).

I don’t like this approach -:(.

Nobody ever does. :frowning: I guess that suggesting you popen(“netinfo -l”)
instead also wouldn’t be well received, then. :slight_smile:

I noticed that when I run ‘netinfo -l’, it knows if the network PCMCIA
card
is in or not. How does ‘netinfo -l’ work?

It sends private messages to Net.

Yes. I sent a message to Net to get the MAC address. Net always returns
the MAC address even when the network PCMCIA card is not in. I would like
to send Net a message, to find out if the network card is in or not. How do
I do this?

I don’t think that part of netinfo’s messages are public – the one person
I know of who got the information had to go through some channels and sign
a non-disclosure agreement to get the information. (That was for the
netinfo -l messages, he wasn’t looking at card in or out from PCMCIA.
It might be easier to go through the pin side of things than the Net
side of things, but either way, you’ll probably have to go through a
contact, probably sales, possibly technical support if you have a
support plan. Either way, I may not get that information for you. My
apologies.)

-David

David Gibbs <dagibbs@qnx.com> wrote in message
news:91domd$pqu$2@nntp.qnx.com

Augie Henriques <> augiehenriques@hotmail.com> > wrote:

David Gibbs <> dagibbs@qnx.com> > wrote in message
news:91bc8d$ckl$> 6@nntp.qnx.com> …
Augie Henriques <> augiehenriques@hotmail.com> > wrote:
Hi.

I would like to check from C code if the network PCMCIA card is plug
in
on a
laptop. How is this done?

You could parse the output from popen(“pin”).

I don’t like this approach -:(.

Nobody ever does. > :frowning: > I guess that suggesting you popen(“netinfo -l”)
instead also wouldn’t be well received, then. > :slight_smile:

I noticed that when I run ‘netinfo -l’, it knows if the network
PCMCIA
card
is in or not. How does ‘netinfo -l’ work?

It sends private messages to Net.

Yes. I sent a message to Net to get the MAC address. Net always
returns
the MAC address even when the network PCMCIA card is not in. I would
like
to send Net a message, to find out if the network card is in or not.
How do
I do this?

I don’t think that part of netinfo’s messages are public – the one person
I know of who got the information had to go through some channels and sign
a non-disclosure agreement to get the information. (That was for the
netinfo -l messages, he wasn’t looking at card in or out from PCMCIA.
It might be easier to go through the pin side of things than the Net
side of things, but either way, you’ll probably have to go through a
contact, probably sales, possibly technical support if you have a
support plan. Either way, I may not get that information for you. My
apologies.)

I’m already talking to Net to get the MAC address. I just wish it did not
send me a valid MAC address when there is no network card connected in the
PCMCIA slot. I will sign the NDA. Our sales person is Jason Kennedy.
Would you like me to talk to him, or can you just e-mail him part of this
posting?

Thanks

Augie

-David

Augie Henriques <augiehenriques@hotmail.com> wrote:

I don’t think that part of netinfo’s messages are public – the one person
I know of who got the information had to go through some channels and sign
a non-disclosure agreement to get the information. (That was for the
netinfo -l messages, he wasn’t looking at card in or out from PCMCIA.
It might be easier to go through the pin side of things than the Net
side of things, but either way, you’ll probably have to go through a
contact, probably sales, possibly technical support if you have a
support plan. Either way, I may not get that information for you. My
apologies.)

I’m already talking to Net to get the MAC address. I just wish it did not
send me a valid MAC address when there is no network card connected in the
PCMCIA slot. I will sign the NDA. Our sales person is Jason Kennedy.
Would you like me to talk to him, or can you just e-mail him part of this
posting?

You should talk to him.

-David

QNX Training Services
dagibbs@qnx.com

  • Mario

“People looking to serious, should be looking to Sirius”

“David Gibbs” <dagibbs@qnx.com> wrote in message
news:91domd$pqu$2@nntp.qnx.com

Augie Henriques <> augiehenriques@hotmail.com> > wrote:

David Gibbs <> dagibbs@qnx.com> > wrote in message
news:91bc8d$ckl$> 6@nntp.qnx.com> …
Augie Henriques <> augiehenriques@hotmail.com> > wrote:
Hi.

I would like to check from C code if the network PCMCIA card is plug
in
on a
laptop. How is this done?

You could parse the output from popen(“pin”).

I don’t like this approach -:(.

Could you write a program that would get started by pcmcia.launch.

Nobody ever does. > :frowning: > I guess that suggesting you popen(“netinfo -l”)
instead also wouldn’t be well received, then. > :slight_smile:

I noticed that when I run ‘netinfo -l’, it knows if the network
PCMCIA
card
is in or not. How does ‘netinfo -l’ work?

It sends private messages to Net.

Yes. I sent a message to Net to get the MAC address. Net always
returns
the MAC address even when the network PCMCIA card is not in. I would
like
to send Net a message, to find out if the network card is in or not.
How do
I do this?

The MAC address you receive from Net is the one specified in the netmap.
It’s a different interface then what netinfo uses.

I don’t think that part of netinfo’s messages are public – the one person
I know of who got the information had to go through some channels and sign
a non-disclosure agreement to get the information. (That was for the
netinfo -l messages, he wasn’t looking at card in or out from PCMCIA.
It might be easier to go through the pin side of things than the Net
side of things, but either way, you’ll probably have to go through a
contact, probably sales, possibly technical support if you have a
support plan. Either way, I may not get that information for you. My
apologies.)

It would probably be easier to get source to pin, not to mention more
reliable
in the long run ( I can think of a way to make beleive to Net that
the card is still there eventhough it was removed)

-David

Mario Charest <mcharest@void_zinformatic.com> wrote:


Could you write a program that would get started by pcmcia.launch.

Just to avoid confusion… that is PcmciaLaunch – make it a bit easier
to find.

Probaby a good choice as well. It will start a program when a card is
inserted, and hit it with a SIGTERM when removed.

-David

QNX Training Services
dagibbs@qnx.com

David Gibbs <dagibbs@qnx.com> wrote in message
news:91lovu$g6k$1@nntp.qnx.com

Mario Charest <mcharest@void_zinformatic.com> wrote:


Could you write a program that would get started by pcmcia.launch.

Just to avoid confusion… that is PcmciaLaunch – make it a bit easier
to find.

Probaby a good choice as well. It will start a program when a card is
inserted, and hit it with a SIGTERM when removed.

This will not work for what I need to do. Thanks anyway for the info.

Augie

-David

QNX Training Services
dagibbs@qnx.com

Mario Charest <mcharest@void_zinformatic.com> wrote in message
news:8ft%5.4034$1%4.146998@wagner.videotron.net

  • Mario

“People looking to serious, should be looking to Sirius”

“David Gibbs” <> dagibbs@qnx.com> > wrote in message
news:91domd$pqu$> 2@nntp.qnx.com> …
Augie Henriques <> augiehenriques@hotmail.com> > wrote:

David Gibbs <> dagibbs@qnx.com> > wrote in message
news:91bc8d$ckl$> 6@nntp.qnx.com> …
Augie Henriques <> augiehenriques@hotmail.com> > wrote:
Hi.

I would like to check from C code if the network PCMCIA card is
plug
in
on a
laptop. How is this done?

You could parse the output from popen(“pin”).

I don’t like this approach -:(.


Could you write a program that would get started by pcmcia.launch.

Nobody ever does. > :frowning: > I guess that suggesting you popen(“netinfo -l”)
instead also wouldn’t be well received, then. > :slight_smile:

I noticed that when I run ‘netinfo -l’, it knows if the network
PCMCIA
card
is in or not. How does ‘netinfo -l’ work?

It sends private messages to Net.

Yes. I sent a message to Net to get the MAC address. Net always
returns
the MAC address even when the network PCMCIA card is not in. I would
like
to send Net a message, to find out if the network card is in or not.
How do
I do this?

The MAC address you receive from Net is the one specified in the netmap.
It’s a different interface then what netinfo uses.


I don’t think that part of netinfo’s messages are public – the one
person
I know of who got the information had to go through some channels and
sign
a non-disclosure agreement to get the information. (That was for the
netinfo -l messages, he wasn’t looking at card in or out from PCMCIA.
It might be easier to go through the pin side of things than the Net
side of things, but either way, you’ll probably have to go through a
contact, probably sales, possibly technical support if you have a
support plan. Either way, I may not get that information for you. My
apologies.)

It would probably be easier to get source to pin, not to mention more
reliable
in the long run ( I can think of a way to make beleive to Net that
the card is still there eventhough it was removed)

Using the source for pin is fine with me. I just had noticed that
‘netinfo -l’ correctly did what I needed to duplicate from c code.

I guess Jason is looking into this.

Thanks

Augie

-David