Older blog entries for miconof (starting at number 4)

28 Oct 2004 (updated 28 Oct 2004 at 10:10 UTC) »

Just put a First Realease of the Caps protocole on freshmeat using between the RedCap (Hotline Client) and the Caps Interface, which talk via a "telnet" like protocole. http://freshmeat.net/projects/redcap/

It's only in french for the momment.

8 Oct 2004 (updated 8 Oct 2004 at 06:19 UTC) »
I post today in here for a trouble I have in my devellopement in 
my project Caps www.caps-project.com. 
If someone has an idee and can help me thanks to write me a mail.
miconof@yahoo.fr

I do a function that will upload a file to a server. This function "void send_file(t_thread_data *transfert)" is call in a thread wich in first open the connection and then will upload the file. The "send_file" function take in parameters the file descriptor of the open fd of the new connection. All seems to work normaly, but not. The first "buffer" is sent normaly, but when it will go to start uploading the second buffer I obtain an error that said : "mmap:invalid argument; mmap:illegal seek". Then the thread exit and my upload file had received only is first 5 octets. Here is my debug starting just when "send_file" is call:

[...] openning [notes.txt]... function:send_file_in boucle fdd:13 offset:0 apres mmap sending [notes.txt] on fd 12 ... 1/1269 [notes.txt]: sent 5 of 6340 bytes on fd 12, 5 allocated boucle fdd:13 offset:5 mmap: Invalid argument mmap:[Illegal seek] after send_file fin de main_create_download [Thread 65541 (LWP 16794) exited] [...] Here is my function ("send_file" is at the bottom).

#define MY_READ_SIZE 5

int send_file_in(int fd, int ffd, char *file) { int part, of, mappedsize, s, t; struct stat st; char *file_ptr; off_t offset;

if (gl_redcap->debug->functions) printf("function:send_file_in\n"); offset = 0; mappedsize = 0; fstat(ffd, &st); fflush(stdout); part = 1; of = (st.st_size / MY_READ_SIZE) +1; offset = lseek(ffd, 0, SEEK_SET); t = st.st_size; while (mappedsize < t) { printf("boucle fdd:%d offset:%d\n", ffd, (int)offset); if ((file_ptr = mmap(0, MY_READ_SIZE, PROT_READ, MAP_PRIVATE, ffd, offset)) == MAP_FAILED) { perror ("mmap"); printf("mmap:[%s]\n", strerror(errno)); return (0); } printf("apres mmap\n"); printf("sending [%s] on fd %d ... %d/%d\n", file, fd, part++, of); if ((s = write(fd, file_ptr, MY_READ_SIZE)) == -1) { perror("send"); printf("[%s]\n", strerror(errno)); return (0); } if (munmap(file_ptr, MY_READ_SIZE) == -1) { perror ("munmap"); printf("[%s]\n", strerror(errno)); } mappedsize += MY_READ_SIZE; printf("[%s]: sent %d of %d bytes on fd %d, %d allocated\n", file, s, t, fd, mappedsize); if ((offset = lseek(ffd, MY_READ_SIZE, SEEK_CUR)) == -1) { perror ("lseek"); printf("lseek:[%s]\n", strerror(errno)); return (0); } } offset = lseek(ffd, 0, SEEK_SET); return(0); }

void send_file(t_thread_data *transfert) { int ffd;

printf("openning [%s]...\n", transfert->info->name); if ((ffd = open(transfert->info->name, O_RDONLY, 0)) < 0) { perror("open"); } send_file_in(transfert->fd, ffd, transfert->info->name); printf("after send_file\n"); /* if (close(ffd) == -1) */ /* { */ /* perror("close"); */ /* printf("[%s]\n", strerror(errno)); */ /* } */ }

Hi, i don't post in here since a long time...

I just got my new laptop a x31 to remplace my powerbook G4 (it's my father one, i will give it back to him).
I installed NetBSD on it. To boot the installer i use a usb drive which was recognise as a hard drive by the bios. The only thing to be carreful is to select (after pluging the usb drive) the drive boot order under the bios and to put the usb drive in first. For the momment i'm configuring (playing in fact), but i will restart all the installation from the begining to make an hibernation part on my hard drive.

I also work on my project Caps http://freshmeat.net/~caps/ or http://www.caps-project.com. Which is a new hotline multi-OS client and server.

I will also move my personnal server which is actualy run under NetBSD on an eden 500mhz on a compaq proliant ml370 petium III 1ghz that a friend give to me, thanks Raph :-) . Because it's a real server, and really noisy, i must build a wood case with fan to put it in my toilet.

One of the last thing i do also is to install an old version of Linux 2.0.33 MkLinux on my powermac 6100/60 which i will use to monitor my server with MRTG.

9 Nov 2003 (updated 9 Nov 2003 at 21:02 UTC) »

My NetBSD file server name is Rapace it run under an Epia M mini itx, and i had trouble with the mainboard ethernet card, with the help of Gilbou i update my NetBSD to current, and now it work really whell.
I did also a script wich i put in a crontab which look at the download status of my mldonkey, and then it send it to the background of my osX main computer wich name is Titan. I also put new drive in Rapace my file server it now have 300 gig.

I'm also looking in how to put my mldonkey into a chroot.

I don't find an other computer for my firewall, i also need a small switch.

My hotline client server project will start very soon, we have our first meet in 2 days.

16 Jul 2003 (updated 16 Jul 2003 at 09:49 UTC) »

Hello, I'm a student, I wanted to become a Network and System administrator, but I think I'm only at the beginning of a long trip.

For the momment, I'm in a job experience of a Network administrator, I work at viaFrance, it's a website on wich are list "all" the events in France. Their network is under win2000.
-In first I give them their own internet connection. We are localise in an hotel, and before we used the hotel internet connection.
-I build a NetBSD bridge between viaFrance network and the hotel network.
-I plane all the backup of the data and the data base, but it doesn't work as wheel as I want for the momment.
-I tried to put an Ipcop firewall but it's not finish yet.

In my home I work under Mac OsX, I have a file serveur under NetBSD on which I run a NFS serveur. I put all my files on the NetBSD and I use them on the mac.
I wanted to put in place a NetBSD firewall on an other computer.

The projet I plane for after my job experience is to build an Hotline Client-Serveur which can work under i386 ppc sun alpha. This client-serveur will communicate only encrypte data.

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!