之前有想寫一個 FQDN 轉 IP 的東西
用了 gethostbyname() 去做,不過這個 function 只適用 IPv4
輸入了 v6 相關的位址,會直接吐一個 segmentation fault 出來@@
所以改用 getaddrinfo() 跟 getnameinfo 來做相關的功能

zzzaaa12 發表在 痞客邦 留言(0) 人氣()

剛才寫了一個簡單的多執行序程式....記錄一下
#include <stdio.h>
#include <pthread.h>

void* thread0(void*);
void* thread1(void*);

int main(void) {

void* result;
pthread_t t0;
pthread_t t1;

pthread_create(&t0, NULL, thread0, NULL);
pthread_create(&t1, NULL, thread1, NULL);

/* wait for thread terminate */
pthread_join(t0, &result);
pthread_join(t1, &result);

return 0;
}

void* thread0(void *argu) {

int i = 0;

for (; i<5; i++) {
printf("thread0: %d\n", i);
sleep(1);
}

return NULL;
}


void* thread1(void *argu) {

int i = 0;

for (; i<10; i++) {
printf("thread1: %d\n", i);
sleep(1);
}

return NULL;
}

zzzaaa12 發表在 痞客邦 留言(0) 人氣()

 
1. 安裝update manager
sudo apt-get install update-manager-core
 

zzzaaa12 發表在 痞客邦 留言(0) 人氣()

不小心晃到....感覺還蠻實用的

IPv6 Addressing
IPv4-IPv6 Co-Existence
DHCP for IPv6 (DHCPv6)

zzzaaa12 發表在 痞客邦 留言(0) 人氣()

2009年在 台灣NGN IPv6移轉技術入口網 上面
寫了一份簡單的IPv6 Server架設教學
發現blog還有存檔....就把它開放出來~~

zzzaaa12 發表在 痞客邦 留言(0) 人氣()

網卡設定

啟動網卡:ifconfig eth0 up
啟動網卡(2):ifup eth0
關閉網卡:ifconfig eth0 down
關閉網卡(2):ifdown eth0
設定MTU:ifconfig eth0 1500

zzzaaa12 發表在 痞客邦 留言(0) 人氣()

之前有幾次曾經嘗試用 UNetbootin 將 Debian ISO 放進隨身碟
但是剛進安裝時似乎都不給面子....一直說讀不到ISO檔之類的
今天則是整個不給開
 

zzzaaa12 發表在 痞客邦 留言(0) 人氣()

 
時間過得很快....轉眼間我進去成功嶺新訓了.....現在剛結束正在放結訓假XD
下週一準備到台北上班囉
也順便紀錄一下這18天在成功嶺的一些重要的事情或經歷~~

zzzaaa12 發表在 痞客邦 留言(0) 人氣()

 
下面是我電腦裡面常見的好用軟體
順便整理一下讓自己重灌的時候也可以很快想起來要灌哪些東西

zzzaaa12 發表在 痞客邦 留言(0) 人氣()

SDC11531.JPG
最後一天
這天是趕飛機大作戰!!!
13:00的飛機
就繼續看圖說故事~~~不過當時跑的超辛苦

zzzaaa12 發表在 痞客邦 留言(0) 人氣()

SDC11341.JPG
 
第四天
這天要把握時間去買紀念品跟吃東西>"<
 

zzzaaa12 發表在 痞客邦 留言(0) 人氣()

SDC11240.JPG
這是下集.....
在附近逛完後.....就跑到熱鬧的東大門逛逛囉
一樣還是搭地鐵過去(萬年老梗)
 

zzzaaa12 發表在 痞客邦 留言(0) 人氣()

1 2 3
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。