2006
03.30
Se qualcuno si dovesse trovare nella singolare condizione di debuggare un programma che cattura pacchetti, e che funziona perfettamente effettuando la cattura su una vera rete, ma che crasha miseramente quando si cattura sull’interfaccia di loopback… dia un’occhiata al proprio ifconfig:
eth0 Link encap:Ethernet HWaddr 00:0F:20:C7:97:45
inet addr:w.x.y.z Bcast:w.x.y.127 Mask:255.255.255.128
inet6 addr: fe80::20f:20ff:fec7:9745/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15777 errors:0 dropped:0 overruns:0 frame:0
TX packets:11395 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7136099 (6.8 MiB) TX bytes:939205 (917.1 KiB)
Interrupt:11 Base address:0x2000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1115 errors:0 dropped:0 overruns:0 frame:0
TX packets:1115 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:155221 (151.5 KiB) TX bytes:155221 (151.5 KiB)
In questo modo dovrebbe realizzare che l’MTU dell’interfaccia lo è leggermente più alto di quello delle interfacce Ethernet. Pertanto, gli conviene dare un occhio alle proprie malloc. Io ci ho messo una settimana a capirlo… E ci sono arrivato solo grazie a Valgrind, ottimo tool.
2006
03.29
Categoria:
Sport /
Tag: nessun tag /
Un turno di Champions League con il Milan che pareggia senza gol, con 20 minuti di netto predominio e un intero tempo di netta sofferenza, la Juve che perde rovinosamente e l’Inter che addirittura vince (seppur in casa)…
Where will it end?
2006
03.25
Compilare libcdio su MinGW è un po’ problematico. Nella fattispecie emergono diversi problemi, che al momento ho aggirato così, in modo molto hackoso:
- Lanciare il solito ./configure (io ho optato per ./configure –prefix=/usr –bindir=/bin –libdir=/bin).
- aggiungere all’inizio di config.h:
#ifndef SUKKOPERA
#define SUKKOPERA
#include <stdio.h>
#include <sys/time.h>
/* POSIX.1b structure for a time value. This is like a `struct timeval'
but has nanoseconds instead of microseconds. */
struct timespec
{
time_t tv_sec; /* Seconds. */
long int tv_nsec; /* Nanoseconds. */
};
#define S_IRGRP 0
#define S_IROTH 0
#define S_IWGRP 0
#define S_IWOTH 0
#define S_IXGRP 0
#define S_IXOTH 0
#define S_IFLNK 0
#define S_IFSOCK 0
#define S_ISUID 0
#define S_ISGID 0
#define S_ISVTX 0
#endif
- Lanciare:
ln -s include/cdio* .
- Modificare Makefile, eliminando dalla riga SUBDIRS = … le directory test e example.
Fine, con un bel make il tutto compilerà. Ora c’è da capire se funziona, anche…
2006
03.24
I need to be myself
I can’t be no-one else
I’m feeling supersonic
Give me gin and tonic
You can have it all but how much do you want it?
You make me laugh
Give me your autograph
Can I ride with you in your BMW ?
You can sail with me in my yellow submarine
You need to find out
‘Cause no-one’s gonna tell you what I’m on about
You need to find a way for what you want to say
But before tomorrow
‘Cause my friend said he’d take you home
He sits in a corner all alone
He lives under a waterfall
Nobody can see him
Nobody can ever hear him call
You need to be yourself
You can’t be no-one else
I know a girl called Elsa
She’s into Alka Seltzer
She sniffs it through a cane on a supersonic train
She made me laugh
I got her autograph
She’s done it with a doctor on a helicopter
She’s sniffin in her tissue
Selling the Big Issue
She needs to find out
‘Cause no one’s gonna tell you what I’m on about
She needs to find a way for what she wants to say
But before tomorrow
‘Cause my friend said he’d take you home
He sits in a corner all alone
He lives under a waterfall
Nobody can see him
Nobody can ever hear him call