* network status
@ 2017-01-24 19:39 Sriram V
2017-01-25 22:05 ` Cong Wang
0 siblings, 1 reply; 2+ messages in thread
From: Sriram V @ 2017-01-24 19:39 UTC (permalink / raw)
To: netdev
Hello,
Apologies in case, this is not the right list of this question.
I wanted to check, How can i find out if a network status has changed
1. How can the user application find out if the link status has changed?
2. what changes do i need to add in the driver to indicate to the user
applications that ethernet cable has been plugged in or unplugged.
3. How should a user application know the status change (Should the
userapp poll on the interface/is there an uevent interface to indicate
the link status change)
Thanks.
Sriram
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: network status
2017-01-24 19:39 network status Sriram V
@ 2017-01-25 22:05 ` Cong Wang
0 siblings, 0 replies; 2+ messages in thread
From: Cong Wang @ 2017-01-25 22:05 UTC (permalink / raw)
To: Sriram V; +Cc: Linux Kernel Network Developers
On Tue, Jan 24, 2017 at 11:39 AM, Sriram V <vshrirama@gmail.com> wrote:
> Hello,
>
> Apologies in case, this is not the right list of this question.
>
> I wanted to check, How can i find out if a network status has changed
>
> 1. How can the user application find out if the link status has changed?
There are some flags per netdevice for its link status, IFF_LOWER_UP
etc., they are sent to user-space via rtnetlink message, ->ifi_flags.
> 2. what changes do i need to add in the driver to indicate to the user
> applications that ethernet cable has been plugged in or unplugged.
>
Probably nothing but calling netif_carrier_on/off() API's.
> 3. How should a user application know the status change (Should the
> userapp poll on the interface/is there an uevent interface to indicate
> the link status change)
>
It needs to subscribe to the rtnetlink group RTNLGRP_LINK to receive
the broadcasts from kernel.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-25 22:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-24 19:39 network status Sriram V
2017-01-25 22:05 ` Cong Wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.