Char Hexa Conversion for socket raw!HELP ME PLEASE!
Hello!
I have a little problem.
I want to send with socket raw some message to a server from a client.
The Hardware Address of then client is given as main argv.
Now I must set these fields:
unsigned char sll_addr[8];
Example:
if the Hardware Address is "01:02:03:04:05:FF" I must set:
sll_addr[0]=0x01;
sll_addr[1]=0x02;
sll_addr[2]=0x03;
sll_addr[3]=0x04;
sll_addr[4]=0x05;
sll_addr[5]=0xFF;
Now how do I make a function that has as parameter a string like "01:02:03:04:05:FF" and set sll_addr?
PLEASE HELP ME!
THANK YOU!