예제 #1
0
파일: su_os_nw.c 프로젝트: PeterXu/sipstack
static void *su_start_nw_os_thread(void *ptr)
{
  su_network_changed_t *snc = (su_network_changed_t *) ptr;

  assert(snc);

  CreateIPAddressListChangeCallbackSCF(nw_changed_cb,
				       (void *) snc,
				       snc->su_storeRef,
				       snc->su_sourceRef);

  CFRunLoopRun();

  return NULL;
}
예제 #2
0
void installMacNetworkInterfaceChangeTracker() {
    CreateIPAddressListChangeCallbackSCF(MacInterfacesChangedCallback,
		NULL, &storeRef, &interfaceChangeRunLoopSourceRef);
	CFRunLoopAddSource(CFRunLoopGetCurrent(), interfaceChangeRunLoopSourceRef, kCFRunLoopCommonModes);
}