Index: zaptel.h =================================================================== --- zaptel.h (révision 12) +++ zaptel.h (copie de travail) @@ -1134,6 +1134,40 @@ int lastdetect; } sf_detect_state_t; + + +#ifdef CONFIG_ZAP_UDEV + +/* Zaptel Sysfs defines and structures */ + +/* @brief the default type for zaptel's class devices +* +* This type is currently set for zaptranscode/zapctl/zaptimer/zappseudo/zapchannel +*/ +#define ZT_CLASS_DEVICE_TYPE_DEFAULT 0 + +/* @brief the type for channels class devices */ +#define ZT_CLASS_DEVICE_TYPE_CHANNEL 1 + +/* @brief the type for spans class devices */ +#define ZT_CLASS_DEVICE_TYPE_SPAN 2 +/* +* @note the above defines may be needed even in user-space context +* because we may expose the class device type in sysfs attributes +* or in uevent environment variables. +*/ + + +#ifdef __KERNEL__ +/* @brief opaque structure to be added into spans and channels that represent +* its sysfs representation +*/ +struct zt_sysfs_class_device; +#endif /* __KERNEL__ */ + +#endif /* CONFIG_ZAP_UDEV */ + + struct zt_chan { #ifdef CONFIG_ZAPATA_NET /* Must be first */ @@ -1341,6 +1375,10 @@ devfs_handle_t fhandle; /* File handle in devfs for the channel */ devfs_handle_t fhandle_symlink; #endif /* CONFIG_DEVFS_FS */ + +#ifdef CONFIG_ZAP_UDEV + struct zt_sysfs_class_device *class_dev; /*