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_ser.c wrapsock.c -o udp_file_ser<br />
[student@localhost ~]$ ./ udp_file_ser<br />
./udptranser: waiting for data on port UDP 1500<br />
./ udp_file_ser: from 169.254.17.41:UDP32782 : #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: 52