Hi everyone, I have been trying to print out some of the information in the kernel just to see if I understand correctly but without much luck so far. So in sys_socketcall() function, when the user calls, for example, getsockname(), then I want to print out IP address. So here is what I did. case SYS_GETSOCKNAME: err = sys_getsockname(a0,(struct sockaddr __user *)a1, (int __user *)a[2]); { #define ILHO_IP_NUMS(x) (x)&0xff, ((x)>>8)&0xff, ((x)>>16)&0xff, (x)>>24 struct sockaddr *name = (struct sockaddr __user*)a1; struct in_addr ip = ((struct sockaddr_in *)&name)->sin_addr; Printk("GETSOCKNAME - %d.%d.%d.%d\n", ILHO_IP_NUMS(ip.s_addr)); } break; However, I did not get the value in the way I expected so I was just wondering if I have to do anything here. Please kindly give me some advice. Thank you. Ilho <>< -- YES, JESUS LOVES YOU, TOO. - Come for Eng. Christian Fellowship on Friday 6pm! For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life(John 3:16). -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ