Download File
Download File Download File
} argv[0],inet_ntoa(cliAddr.sin_addr), ntohs(cliAddr.sin_port),msg); sleep(1); sendto(sd,msg,n,flags,(struct sockaddr *)&cliAddr,cliLen); }/* end of server infinite loop */ return 0; /* Compiling…………. $CC udp_strrev_ser.c wrapsock.c -o udpstrrevser Execution………….. $udpstrrevser */ NP Lab Manual , RNEC page: 42
Output: [student@localhost ~]$ cc udp_strrev_ser.c wrapsock.c -o udpstrrrevser [student@localhost ~]$ ./udpstrrevser ./ udpstrrevser: waiting for data on port UDP 1500 ./ udpstrrevser: from 169.254.17.41:UDP32782 : iah ./ udpstrrevser: from 169.254.17.41:UDP32782 : woh ./ udpstrrevser: from 169.254.17.41:UDP32782 : era ./ udpstrrevser: from 169.254.17.41:UDP32782 : u NP Lab Manual , RNEC page: 43
- Page 1 and 2: IV YEAR B.Tech Network Programming
- Page 3 and 4: o after call to fork o after both c
- Page 5 and 6: WEEK 1: Aim: Implement the pipe usi
- Page 7 and 8: Subject: NETWORK PROGRAMMING LAB Ye
- Page 9 and 10: Output: [student@localhost ~]$ vi p
- Page 11 and 12: Output: [student@localhost ~/khan]$
- Page 13 and 14: } fclose(f); //closing file //creat
- Page 15 and 16: Subject: NETWORK PROGRAMMING LAB Ye
- Page 17 and 18: Output: [student@localhost ~]$ cc m
- Page 19 and 20: main() { int shmid; int semid; key_
- Page 21 and 22: } for (i = 0; i < CHILD_INCREMENT_C
- Page 23 and 24: if (*parent_shm == (CHILD_INCREMENT
- Page 25 and 26: Subject: NETWORK PROGRAMMING LAB Ye
- Page 27 and 28: Output: [student@localhost ~]$ cc t
- Page 29 and 30: Output: [student@localhost ~]$ ./ t
- Page 31 and 32: } bzero(&servaddr, sizeof(servaddr)
- Page 33 and 34: Subject: NETWORK PROGRAMMING LAB Ye
- Page 35 and 36: Subject: NETWORK PROGRAMMING LAB Ye
- Page 37 and 38: Output: [student@localhost ~]$ cc t
- Page 39 and 40: Output: [student@localhost ~]$ cc t
- Page 41: servAddr.sin_addr.s_addr = htonl(IN
- Page 45 and 46: *error = 0; return FD_ISSET(sd,&soc
- Page 47 and 48: if(n
- Page 49 and 50: Subject: NETWORK PROGRAMMING LAB Ye
- Page 51 and 52: printf("%s: from %s:UDP%u : %s \n"
- Page 53 and 54: Subject: NETWORK PROGRAMMING LAB Ye
- Page 55 and 56: cliAddr.sin_family = AF_INET; cliAd
- Page 57 and 58: Output: [student@localhost ~]$ cc u
- Page 59 and 60: if(rc
- Page 61 and 62: Output: [student@localhost ~]$ cc u
- Page 63 and 64: if (select(sd+1,&socketReadSet,0,0,
- Page 65 and 66: } (struct sockaddr *) &echoServAddr
Output:<br />
[student@localhost ~]$ cc udp_strrev_ser.c wrapsock.c -o udpstrrrevser<br />
[student@localhost ~]$ ./udpstrrevser<br />
./ udpstrrevser: waiting for data on port UDP 1500<br />
./ udpstrrevser: from 169.254.17.41:UDP32782 : iah<br />
./ udpstrrevser: from 169.254.17.41:UDP32782 : woh<br />
./ udpstrrevser: from 169.254.17.41:UDP32782 : era<br />
./ udpstrrevser: from 169.254.17.41:UDP32782 : u<br />
NP Lab Manual , RNEC page: 43