예제 #1
0
void thread_run(void *arg)
{
    struct argument *arg_thread1;/*这里定义了一个指向argument类型结构体的指针arg_thread1,用它来接收传过来的参数的地址*/
    
    arg_thread1=(struct argument *)arg;
    int size = arg_thread1->e_port - arg_thread1->s_port + 2;
    int *result = (int *)malloc(sizeof(int)*size);
    scan_r(arg_thread1->ip, arg_thread1->s_port, arg_thread1->e_port, result);
    res[arg_thread1->i] = result;
    pthread_exit(NULL);
}
예제 #2
0
파일: pscan_posix.c 프로젝트: ivytin/MISC
void thread_run(void *arg)
{
    struct argument *arg_thread;/*argument value including target info*/

    arg_thread=(struct argument *)arg;
    int size = arg_thread->e_port - arg_thread->s_port + 2;
    int *result = (int *)malloc(sizeof(int)*size);
    scan_r(arg_thread->ip, arg_thread->s_port, arg_thread->e_port, result);
    res[arg_thread->i] = result;
    pthread_exit(NULL);
}