From: Daniel M. <da...@os...> - 2004-04-30 20:43:15
|
Hi Jon, I looking over the changes to the topology events and had some questions: old way was: ioctl(tipc_fd, NETWORK_SUBSCRIBE, 0); poll() looking for NETWORK_EVENT ioctl(tipc_fd, GET_NETWORK_EVENT, &netw_subscr) which return a node_id and up/down indication New way is: ioctl(tipc_fd, TIPC_SUBSCRIBE, &tipc_subscr) with tipc_subscr.seq.type = 0 tipc_subscr.seq.lower = tipc_addr(zone, cluster, 0); tipc_subscr.seq.upper = tipc_addr(zone, cluster, 0xfff); tipc_subscr.timeout = TIPC_WAIT_FOREVER; tipc_subscr.usr_handle = "abc"; poll() looking for TIPC_TOPOLOGY_EVENT ioctl(tipc_fd, TIPC_GET_EVENT, &tipc_event); on return: tipc_event.event = TIPC_PUBLISHED (node joined?) TIPC_WITHDRAWN (node died/left?) TIPC_SUBSCR_TIMEOUT tipc_event.port.node = node_who_joined_or_left Do I have this correct? Do the other fields mean anything? Also in manager.c, the mng_cmd_event() function has case TIPC_SUBSCRIBE: How is this used? Can you subscribe to events on the management port? How are results returned? Thanks, Daniel |