반응형 분류 전체보기177 [C Network Programming] Parity Code C코드 #include #pragma warning(disable:4996) int main() { char Cnum_1; char Cnum_2; int i, j; int result_1[20]; int result_2[20]; result_1[7] = 0; result_2[7] = 0; int count_a1 = 0, count_a2 = 0, count_b1 = 0, count_b2 = 0; printf("Cnum_1,Cnum_2입력: "); scanf("%c %c",&Cnum_1,&Cnum_2); printf("Cnum_1:%d\nCnum_2:%d\n", Cnum_1, Cnum_2); int num_1 = Cnum_1; int num_2 = Cnum_2; for (i = 0; num_1 > 0; i++) {.. 2024. 3. 13. [Network]ICMPv6 1. 역할 ICMPv6를 간단히 설명하자면 IPv6에서 쓰이는 보조 프로토콜입니다. 사진을 보면 IPv4를 살펴보면 ICMP,IGMP,ARP와 같은 3가지 보조 프로토콜이 있었습니다. 하지만 IPv6에서는 이 기능을 ICMPv6가 모두 맡아 처리합니다. ipv4에서 3가지로 나뉘어졌던 보조 프로토콜을 ipv6에서는 icmpv6 하나로 통합했는데 icmpv6에서 type을 나눠서 NDP, MLD를 사용합니다. NDP는 neighbor discovery protocol의 약자로 ipv4의 arp의 업그레이드된 느낌이라 생각하시면 되고, MLD는 IGMP에서 쓸모없는 기능들을 없애서 나온 업그레이드 버전이라고 생각하시면 됩니다. •ICMPv6는 IPv6에서 쓰기 위해 기존 버전을 업그레이드한 버전이다. •IC.. 2024. 3. 12. [C Network Programming] Dijkstra's Routing Algorithm C code #include #include #define STRANGER 9999 #define MAX 10 #pragma warning (disable:4996) void dijkstra(int G[MAX][MAX], int n, int startnode); int main() { int G[MAX][MAX], i, j, n, u; printf("\nEnter the number of nodes : "); scanf("%d", &n); printf("\nEnter the cost matrix :\n"); for (i = 0; i < n; i++) for (j = 0; j < n; j++) scanf("%d", &G[i][j]); printf("\nEnter the starting node:"); scanf("%d.. 2024. 3. 11. [C Network Programming] Stop&Wait ARQ Protocol /*************************************************************************************/ /* C program to implement stop and wait protocol*/ #include #include #include #include #include #define TIMEOUT 5 #define MAX_SEQ 1 #define TOT_PACKETS 8 #define inc(k) if(k TIMEOUT SENDER : Resending Frame RECIEVER : Acknowledgement Resent SENDER : Info = 2 Seq No = 1 RECIEVER :Packet 2 recieved , Ack Sent S.. 2024. 3. 10. [C Network Programming] Distance Vector Routing Algorithm C code //Node4 = Boston //Which node is not neighbor cost = 9999 #include #pragma warning (disable:4996) struct node { unsigned dist[20]; unsigned from[20]; }rt[10]; int main() { int dmat[20][20]; int n, i, j, k, count = 0; printf("\nEnter the number of nodes : "); scanf("%d", &n); printf("\nEnter the cost matrix :\n"); for (i = 0; i < n; i++) for (j = 0; j < n; j++) { scanf("%d", &dmat[i][j]); dmat[i].. 2024. 3. 10. [리눅스마스터 2급 실기] 2401 A형 가답안 맞춰보실분 오른쪽에 써진 문제 번호들은 애매한 번호들이고, 나머진 맞았다고 90% 확신 합격 b 2024. 3. 9. [Ubuntu OpenCV] VM ware ubuntu에서 웹캠 연결 후 OpenCV 사용해서 Qt GUI 구성하기 opencv 먼저 설치하고 $ pwd /home/ubuntu $ mkdir openCV && cd openCV $ wget -O opencv.zip https://github.com/opencv/opencv/archive/4.5.2.zip $ wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.5.2.zip $ unzip opencv.zip $ unzip opencv_contrib.zip $ cd opencv-4.5.2 $ mkdir build && cd build $ pwd /home/ubuntu/openCV/opencv-4.5.2/build $ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CM.. 2024. 3. 8. [Linux] Ubuntu VMware CLI환경으로 동작시키기 graphic을 띄우는걸 x윈도, runlevel이라고도 한다. $ init 3 를 쳐주면 x 윈도우가 꺼진다. ctrl+alt+F1, ctrl+alt+F2, ctrl+alt+F3 ....를 누르면 새로운 터미널을 열어서 사용할 수 있음. $ sudo init 5 쳐주면 다시 그래픽이 나온다. 2024. 3. 4. 이전 1 2 3 4 5 6 ··· 23 다음 반응형