Main Page | Modules | Data Structures | File List | Data Fields | Related Pages

Networking class
[Linux 2.6 support]

Networking class. More...

Data Structures

struct  link_detection_if_s
 Structure for holding watching information for an ethernet interface. More...


Typedefs

typedef link_detection_if_s link_detection_if
 Structure for holding watching information for an ethernet interface.


Functions

void visit_class_device_net_got_sysdevice (HalDevice *parent, void *data1, void *data2)
 Callback when the sysdevice is found or if there is no parent..

void visit_class_device_net (const char *path, struct sysfs_class_device *class_device)
 Visitor function for net device.

dbus_uint16_t mdio_read (link_detection_if *iface, int location)
 Read a word from the MII transceiver management registers.

void link_detection_process (link_detection_if *iface)
 Check whether status has changed.

gboolean link_detection_timer_handler (gpointer data)
 Timeout handler for processing status on all watched interfaces.

void link_detection_add (HalDevice *device)
 Add a watch for a HAL device; it must be a net.ethernet capable.

void link_detection_remove (HalDevice *device)
 Remove watch for a HAL device.

void new_capability (HalDevice *device, const char *capability, dbus_bool_t in_gdl)
 Callback for when a new capability is added to a device.

void gdl_changed (HalDevice *device, dbus_bool_t is_added)
 Callback for the global device list has changed.

void linux_class_net_init ()
 Init function for block device handling.

void linux_class_net_detection_done ()
 This function is called when all device detection on startup is done in order to perform optional batch processing on devices.

void linux_class_net_shutdown ()
 Shutdown function for block device handling.


Variables

link_detection_iflink_detection_list_head = NULL
 Head of linked list of ethernet interfaces to watch.


Detailed Description

Networking class.


Function Documentation

void gdl_changed HalDevice device,
dbus_bool_t  is_added
[static]
 

Callback for the global device list has changed.

Parameters:
device Pointer a HalDevice object
is_added True iff device was added

Definition at line 498 of file linux_class_net.c.

References ds_query_capability(), HalDevice, link_detection_add(), and link_detection_remove().

Referenced by linux_class_net_init().

void link_detection_add HalDevice device  )  [static]
 

Add a watch for a HAL device; it must be a net.ethernet capable.

Parameters:
device HalDevice object

Definition at line 393 of file linux_class_net.c.

References link_detection_if_s::device, DIE, ds_property_get_string(), HalDevice, link_detection_if_s::ifr, link_detection_if, link_detection_list_head, link_detection_process(), link_detection_if_s::new_ioctl_nums, link_detection_if_s::next, link_detection_if_s::skfd, link_detection_if_s::status_word_baseline, and HalDevice_s::udi.

Referenced by gdl_changed(), and new_capability().

void link_detection_process link_detection_if iface  )  [static]
 

Check whether status has changed.

Parameters:
iface Which interface

Definition at line 291 of file linux_class_net.c.

References link_detection_if_s::device, ds_property_set_bool(), ds_property_set_int(), emit_condition(), link_detection_if, mdio_read(), property_atomic_update_begin(), property_atomic_update_end(), link_detection_if_s::status_word_baseline, and HalDevice_s::udi.

Referenced by link_detection_add(), and link_detection_timer_handler().

gboolean link_detection_timer_handler gpointer  data  )  [static]
 

Timeout handler for processing status on all watched interfaces.

Parameters:
data User data when setting up timer
Returns:
TRUE iff timer should be kept

Definition at line 377 of file linux_class_net.c.

References link_detection_if, link_detection_list_head, link_detection_process(), and link_detection_if_s::next.

Referenced by linux_class_net_init().

dbus_uint16_t mdio_read link_detection_if iface,
int  location
[static]
 

Read a word from the MII transceiver management registers.

Parameters:
iface Which interface
location Which register
Returns:
Word that is read

Definition at line 270 of file linux_class_net.c.

References link_detection_if_s::ifr, link_detection_if, link_detection_if_s::new_ioctl_nums, and link_detection_if_s::skfd.

Referenced by link_detection_process().

void new_capability HalDevice device,
const char *  capability,
dbus_bool_t  in_gdl
[static]
 

Callback for when a new capability is added to a device.

Parameters:
device Pointer a HalDevice object
capability Capability added
in_gdl True iff the device object in visible in the global device list

Definition at line 482 of file linux_class_net.c.

References HalDevice, and link_detection_add().

Referenced by linux_class_net_init().

void visit_class_device_net const char *  path,
struct sysfs_class_device *  class_device
 

Visitor function for net device.

This function parses the attributes present and merges more information into the HAL device this class device points to

Parameters:
path Sysfs-path for device
device libsysfs object for device

Definition at line 76 of file linux_class_net.c.

References ds_add_capability(), ds_device_async_find_by_key_value_string(), ds_device_new(), ds_property_set_int(), ds_property_set_string(), HAL_LINUX_HOTPLUG_TIMEOUT, HalDevice, is_probing, parse_dec(), and visit_class_device_net_got_sysdevice().

Referenced by visit_class_device().

void visit_class_device_net_got_sysdevice HalDevice sysdevice,
void *  data1,
void *  data2
[static]
 

Callback when the sysdevice is found or if there is no parent..

This is where we get added to the GDL..

Parameters:
parent Async Return value from the find call
data1 User data
data2 User data

Definition at line 229 of file linux_class_net.c.

References ds_device_destroy(), ds_device_merge(), and HalDevice.

Referenced by visit_class_device_net().


Generated on Thu Mar 11 21:32:26 2004 for HAL by doxygen 1.3.6-20040222