Menu [hide]

Forum: DCCP-TP

Forums->DCCP-TP->HOw to Compile and Run the Code

gillbrent
HOw to Compile and Run the Code


Hi all..

I was learning the C progrmaing for Linux and now i had finished that so i want to continue work fro DCCP-TP and want to fix the memory bug.. so for that please any body will tell me from the scratch how to compile the DCCP-TP code under Linux and also when i wil run that how to tun the programe and whcih parameter should i need to passes on run time.

Reagrds
Sami Gillbrent.

 
on: Mon 28 of Apr, 2008 [09:11 UTC] reads: 3224

Posted messages

author message
trphelan
Re: HOw to Compile and Run the Code
on: Mon 28 of Apr, 2008 [16:03 UTC]
Hi Sami,

Thanks for your interest :-). To compile the code, go to the ports/pthreads directory and type 'make'. That produces the executable 'dccp-tp'. Run that with no command line options, and it'll run the DCCP server, plus the echo server and client. The client will connect to the server via the IPv4 loopback address (127.0.0.1), using NAT encapsulation.

Check dctpPthreadsMain.c for the few command line options that are supported.

Good luck :-).

Tom P.


author message
gillbrent
Re: HOw to Compile and Run the Code
on: Tue 29 of Apr, 2008 [13:09 UTC]
> Hi all..
>
> I was learning the C progrmaing for Linux and now i had finished that so i want to continue work fro DCCP-TP and want to fix the memory bug.. so for that please any body will tell me from the scratch how to compile the DCCP-TP code under Linux and also when i wil run that how to tun the programe and whcih parameter should i need to passes on run time.
>
> Reagrds
> Sami Gillbrent.

Grest Tom i will do it soon. but make me more clear about DCCP server i did not found any fiel with this named only echo server and echo clien found in that directory?

Cheers!
Sami Gillbrent.


author message
trphelan
Re: HOw to Compile and Run the Code
on: Thu 01 of May, 2008 [16:13 UTC]
Hi Sami,

Well, DCCP service, not server, my typo. It's the code the implements the DCCP protocol, as opposed to an application that uses DCCP.

Tom P.


author message
gillbrent
Re: HOw to Compile and Run the Code
on: Wed 07 of May, 2008 [12:37 UTC]
> Hi all..
>
> I was learning the C progrmaing for Linux and now i had finished that so i want to continue work fro DCCP-TP and want to fix the memory bug.. so for that please any body will tell me from the scratch how to compile the DCCP-TP code under Linux and also when i wil run that how to tun the programe and whcih parameter should i need to passes on run time.
>
> Reagrds
> Sami Gillbrent.

HI Tom,

you mention in your post Run that with no command line options. but what i had seen in depth in "dctpPthreadMain.c"
if you are not passing the argumenst on run time then why you are using the getopt() functions which takes the arguments ?
and what deos the means in Deamon(0,0) --->>> i tryied to googled so much but not found even any reason why u r passing arguments ZERO,ZERO. ?

S. Gillbrent.





author message
trphelan
Re: HOw to Compile and Run the Code
on: Wed 07 of May, 2008 [13:37 UTC]
Hi Sami,

Options — the getopt call is there to allow you to run a few different ways, but the default values of the options are set for the "normal" case, run the echo server and client, don't daemonize. If you want to do something different, then use options.

There are probably quite a few more options that would be useful, but the ones that are there were sufficient for the debugging I did.

daemon(0, 0) — 0 in the first parameter means "change pwd to /" and 0 in the second parameter means "redirect standard input, output and error to /dev/null". I think you'll find the vast majority of uses of daemon are like that.

Tom P.




Show posts: