2015年5月25日 星期一

2015年5月13日 星期三

Simple Linux Socket example

I would like to send the UDP packet carries the syslog payload.

#include the below head file
sys/socket.h
linux/sockios.h
fcntl.h
netdb.h
netinet/ether.h
netpacket/packet.h
net/if.h

The note for Linux shell

1. Iterate the member in the array
declare -a array

for i in "${arrar[@]}"
do
    echo $i
done

2015年5月12日 星期二

簡易DHCP server架設

In Ubuntu,

1. Configure the server IP as 192.168.1.254

2. Configure the default inteface
vi /etc/sysconfig/dhcpd
INTERFACES="eth3"