Lines Matching refs:i

93 	for (int i = 0; i < number_nodes; i++) {  in dealloc_size()  local
94 free(buffer[i]); in dealloc_size()
95 free(send[i]); in dealloc_size()
96 free(pipe_in[i]); in dealloc_size()
97 free(pipe_out[i]); in dealloc_size()
110 for (int i = 0; i < number_nodes; i++) { in setup_reachable_nodes() local
111 if (m[pos][i] > channel_statistic_send) { in setup_reachable_nodes()
112 send[pos][i] = TRUE; in setup_reachable_nodes()
119 for (int i = 0; i < number_nodes; i++) { in reset_reachable_nodes() local
120 send[pos][i] = FALSE; in reset_reachable_nodes()
126 for (int i = 0; i < fdSize; i++) { in broadcast_data() local
127 if (send[pos][i] == TRUE) { in broadcast_data()
128 write(fd_in[i], buf, 1); in broadcast_data()
207 for (int i = 0; i < buffer_index[pos]; ++i) { in fifo_handler() local
208 *buf = buffer[pos][i]; in fifo_handler()
209 buffer[pos][i] = 0xFF; in fifo_handler()
307 for (int i = 0; i < number_nodes; i++) { in main() local
308 buffer_index[i] = 0; in main()
309 packet_state[i] = 0; in main()
310 packet_index[i] = 0; in main()
311 packet_len[i] = 0; in main()
315 for (int i = 0; i < number_nodes; i++) { in main() local
317 send[i][j] = FALSE; in main()
328 for (int i = 0; i < fdSize; i++) { in main() local
329 snprintf(str_num, sizeof(str_num), "%d", (i + 1)); in main()
331 pipe_in[i] = g_strconcat("/tmp/hub/ip-stack-node", in main()
333 pipe_out[i] = g_strconcat("/tmp/hub/ip-stack-node", in main()
336 fifoTrain[i] = setup_fifofd(pipe_out[i], i); in main()
338 if (fifoTrain[i] > 0) { in main()
341 printf("Failed to open the fifo node %d\n", (i + 1)); in main()
356 for (int i = 0; i < fdSize; i++) { in main() local
357 currentIndex = i; in main()
358 fd_in[i] = open(pipe_in[i], O_WRONLY); in main()
360 if (fd_in[i] < 0) { in main()
370 for (int i = 0; i < currentIndex; i++) { in main() local
371 if (fifoTrain[i] >= 0) { in main()
372 g_source_remove(fifoTrain[i]); in main()
375 if (fd_in[i] >= 0) { in main()
376 close(fd_in[i]); in main()
379 g_free(pipe_in[i]); in main()
380 g_free(pipe_out[i]); in main()