Download File
Download File
Download File
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Output:<br />
[student@localhost ~]$ cc udp_file_clnt.c wrapsock.c -o udp_file_clnt<br />
[student@localhost ~]$ ./ udp_file_clnt 169.254.17.41 io.c<br />
./ udp_file_clnt i: sending data to '169.254.17.41' (IP : 169.254.17.41)<br />
..........<br />
./ udp_file_clnt: echo from 169.254.17.41:UDP1500 : #include<br />
#include<br />
#include<br />
#include<br />
#define MAXLINE 4096<br />
int main(int argc,char*argv[])<br />
{<br />
int fd,n;<br />
char buff[2000];<br />
if(argc=2)<br />
{<br />
printf("\n wrong arg...");<br />
exit(0);<br />
}<br />
if((fd=open(argv[1],O_RDONLY))0)<br />
{<br />
write(1,buff,n);<br />
}<br />
exit(0);<br />
}<br />
NP Lab Manual , RNEC page: 57