+int main(int argc, char **argv) {
+
+ struct args *value = (struct args *)malloc(sizeof(struct args));
+ value->args1 = argc;
+ value->args2 = argv;
+// printf("Enter number of e2sim\n");
+// int num_of_e2sim = getch();
+ value->plmnId = 1;
+ //int plmnid = 1;
+
+ int num_of_e2sim;
+ if (value->args2[3] != NULL)
+ {
+ num_of_e2sim = atoi(value->args2[3]);//500;
+ fprintf(stderr,"number of e2sim : %d\n", num_of_e2sim);
+ }
+
+ else
+ {
+ num_of_e2sim = 1;
+ }
+ //int num_of_e2sim = atoi(value->args2[3]);//500;
+
+ //options_t read_input_options(int argc, char* argv[]);
+
+ fprintf(stderr,"value of thread id is %d\n", num_of_e2sim);
+
+ fprintf(stderr,"argc : %d ,ip address:%s, port:%s\n", value->args1,value->args2[1], value->args2[2]);
+
+ pthread_t threads[10000];
+ int retvalue;
+ int i;
+ for( i = 0; i < num_of_e2sim; i++ ) {
+
+ //struct args *value = (struct args *)malloc(sizeof(struct args));
+
+
+ //struct args *value = (struct args *)malloc(sizeof(struct args));
+ //value->args1 = argc;
+ //value->args2 = argv;
+ //value->plmnId = plmnid;
+
+
+ fprintf(stderr,"\n****************************************************************************************************\n");
+ //fprintf(stderr,"argc: %d, argv ip address is:%s,argv port:%s\n",argc, argv[1],argv[2]);
+
+ fprintf(stderr,"value of thread id is %d\n", i);
+ fprintf(stderr,"value of plmn id is %d\n", value->plmnId);
+ fprintf(stderr,"ip address is:%s, port:%s\n", value->args2[1],value->args2[2]);
+ retvalue = pthread_create(&threads[i], NULL, initparam, (void *)value);
+ sleep(2);
+ value->plmnId++;
+ // plmnid++;
+
+ if (retvalue) {
+
+ fprintf(stderr,"Error:unable to create thread, %d\n", retvalue);
+ exit(-1);
+ }
+
+ }
+ pthread_exit(NULL);