1 : telnet WWW telnet WWW URL (html ) ( URL ) [Kenta-Oshiro:network/slab2-np/rep01] j06012% telnet 80 nkf -e GET /index.html HTTP/1

Size: px
Start display at page:

Download "1 : telnet WWW telnet WWW URL (html ) ( URL ) [Kenta-Oshiro:network/slab2-np/rep01] j06012% telnet 80 nkf -e GET /index.html HTTP/1"

Transcription

1 II Fri D :

2 1 : telnet WWW telnet WWW URL (html ) ( URL ) [Kenta-Oshiro:network/slab2-np/rep01] j06012% telnet 80 nkf -e GET /index.html HTTP/1.0 Connection closed by foreign host. Trying Connected to Escape character is ^]. HTTP/ OK Date: Tue, 11 Dec :31:51 GMT sin: Apache/ (Red Hat) Last-Modified: Tue, 11 Dec :58:20 GMT ETag: "53cc e29fcb00" Accept-Ranges: bytes Content-Length: Connection: close Content-Type: text/html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=shift_jis"> <meta http-equiv="content-script-type" content="text/javascript" /> <title> </title> <style type="text/css"> <!-- td font-size: smaller; a img border: none; #image_title font-size: small; text-align: center; color: #B63B3B; --> </style> <link href="preview/ryudai2.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="/js/prototype.js"></script> <script type="text/javascript" src="/js/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="/js/lightbox.js"></script> <link rel="stylesheet" href="/css/lightbox.css" type="text/css" media="screen" / > ~~~~~~~~~~ ~~~~~~~~~~

3 2 : inetd (1) (sin.c) inetd (client.c) (1) (Connect,Disconnect,Send Data,Recv Data ) xinetd inetd inetd xinetd j06001 Kazuki AKAMINE sin.c sin services % sudo emacs -nw /etc/services tcpinetd 5682/tcp tcpinetd xinetd.d % sudo emacs -nw /etc/xinetd.d/tcpinetd sin xinetd % sudo emacs -nw /System/Library/StartupItems/IPServices/IPServices /usr/sbin/xinetd -inetd compat -pidfile /var/run/xinetd.pid StartService() % sudo /System/Library/StartupItems/IPServices/IPServices start sin.c #include <stdlib.h> exit() #define DATAFILE "/Users/j06012/INFO-jikken2/network/data" client.c #include <stdlib.h> exit() #define HOST_NAME "localhost"

4 [Kenta-Oshiro:~/INFO-jikken2/network] j06012%./client Connected. Input Keyword = warning: this program uses gets(), which is unsafe. yama Keyword = [yama] / Data = [kawa] Input Keyword = xyz Keyword = [xyz] / Data = [XYZ] Input Keyword = 123 Keyword = [123] / Data = [456] Input Keyword = xxxx Keyword = [xxxx] / Data = [yyyy] Input Keyword = shiro Keyword = [shiro] / Data = [kuro] Input Keyword = ^C Connect() host name host address Disconnect() SendData() RecvData() GetLineFromPeer GetKeywordData Data

5 Client Server Connect() 通信路を確立 リクエスト コネクションの確立 xinetd() server の呼び出し レスポンス SendData() write() データの送信 GetLineFromPeer() read() データの受信 RecvData() read() データの送信 GetKeywordData() fopen(), fclose() Disconnect() close() ソケットの終了 xinetd() 閉じる 1: 3 :inetd (1) (sin.c) inetd inetd inetd myserver.c #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/errno.h> #include <string.h> #include <ctype.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #define DATAFILE "/Users/j06012/INFO-jikken2/network/slab2-np/rep01/ex3/data2" #define DELIMITS " \t\n\r" /* \t:, \n:, \r: */

6 #define SERVICE_NAME "tcpinetd2"/* /etc/services */ #define PROTOCOL "tcp" char datavalue[256]; /* client */ int GetLineFromPeer(char *line, int socket_num) int i; for(i=0;;) if(1!= read(socket_num, line+i, 1)) continue; else i++; line[i] = \0 ; if( \n == line[i-1]) return i; char *GetKeywordData(char *key) FILE *fp; char buff[256]; if((file *)NULL == (fp = fopen(datafile,"r"))) return (char *)NULL; for(;;) char *p; /* 1 ( )*/ char *pp; /* 2 (p )*/ fgets(buff,256,fp); if(feof(fp)) break; if(ferror(fp)) break; if((char *)NULL == (p = strtok(buff,delimits))) //data2 continue; if((char *)NULL == (pp = strtok((char *)NULL,DELIMITS)))//data2 continue; if(0 == strcmp(p,key)) fclose(fp); strcpy(datavalue,pp); /* */ return datavalue;

7 fclose(fp); return (char *)NULL; int main(void) int socket_num, new_socket_num; struct sockaddr_in serv, clit; struct servent *ServiceEntry; socklen_t sock_size = sizeof(clit); char RecvBuff[256]; /* */ if( (socket_num = socket(af_inet, SOCK_STREAM, 0)) < 0 ) perror("socket()"); /* IP */ if((serviceentry = getservbyname(service_name, PROTOCOL)) == NULL) perror("getservbyname()"); serv.sin_port = ServiceEntry->s_port; serv.sin_family = AF_INET; serv.sin_addr.s_addr = htonl(inaddr_any); /* */ /* */ /* */ if(bind(socket_num, (struct sockaddr *)(&serv), sizeof(serv)) < 0) perror("bind()"); /* */ if(listen(socket_num, SOMAXCONN) < 0) perror("listen()"); for(;;) /* */ /* */ if((new_socket_num = accept(socket_num, (struct sockaddr *)(&clit), &sock_size)) < 0) perror("accept()");

8 /* */ for(;;) char *p; char SendBuff[256]; char *pp; (void)getlinefrompeer(recvbuff, new_socket_num); break; if( = == RecvBuff[0]) /* If End Mark */ if((char *)NULL!= (p = strchr(recvbuff, = ))) *p = \0 ; /* = \0 */ if((char *)NULL == (pp = GetKeywordData(RecvBuff))) sprintf(sendbuff, "%s=\n", RecvBuff); else sprintf(sendbuff, "%s=%s\n", RecvBuff,pp); (void)write(new_socket_num, SendBuff, strlen(sendbuff)); close(new_socket_num); /* */ return 0; myclient.c /*** TCP Client ***/ #include <stdio.h> #include <ctype.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <stdlib.h> #define SERVICE_NAME "tcpinetd2" #define PROTOCOL "tcp" #define HOST_NAME "localhost"

9 int Connect() int SocketNumber; /* Socket descripter */ struct servent *ServiceEntry; /* service entry */ struct hostent *HostEntry; /* host entry */ struct sockaddr_in sin; /* Socket Entry */ /* Get Service Entry by Service-Name */ if((struct servent *)NULL == (ServiceEntry = getservbyname(service_name,protocol))) printf("\7no service [%s].\n",service_name); /* Get Host Entry by Host-Name */ if((struct hostent *)NULL == (HostEntry = gethostbyname(host_name))) printf("\7no Hosts [%s].\n",host_name); /* Get Socket */ if(0 > (SocketNumber = (socket(af_inet,sock_stream,0)))) printf("\7cannot get Socket.\n"); /* Set protocol family name */ sin.sin_family = AF_INET; /* Set Host Address */ bcopy(hostentry->h_addr,&sin.sin_addr,hostentry->h_length); /* Set Port N.o. */ sin.sin_port = ServiceEntry->s_port; if(0 > connect(socketnumber,(struct sockaddr *)(&sin),sizeof(sin))) printf("\7cannot Connect.\n"); return SocketNumber;

10 void Disconnect(int SocketNumber) close(socketnumber); void SendData(int SocketNumber,char *line) if(strlen(line)!= write(socketnumber,line,strlen(line))) printf("\7send Failed.\n"); int RecvData(int SocketNumber,char *line) int i; for(i = 0 ;;) if(1!= read(socketnumber,line + i,1)) continue; else i++; *(line + i) = (char)0; if(((char)( \n )) == *(line + i - 1)) return i; int main() int Sock; char Key[256]; char Data[256]; char buff[256]; Sock = Connect(); /* Connect */ printf("connected.\n"); for(;;) char *p; printf("input Keyword = "); fflush(stdout);

11 gets(key); sprintf(buff,"%s=\n",key); SendData(Sock,buff); /* Send It! */ if(0 == strlen(key)) break; /* If End Mark */ /* ---- Waiting for Server response Here --- */ (void)recvdata(sock,buff); /* Recv It! */ if((char *)NULL!= (p = strchr(buff, \n ))) *p = (char)0; if((char *)NULL!= (p = strchr(buff, = ))) p++; printf("keyword = [%s] / Data = [%s]\n\n",key,p); Disconnect(Sock); /* Disconnect */ printf("disocnnected.\n"); data2 oshiro kenta abc ABC yyyy zzzz aka kuro [Kenta-Oshiro:slab2-np/rep01/ex3] j06012%./myserver & [1] [Kenta-Oshiro:slab2-np/rep01/ex3] j06012% jobs [1] + Running./myserver [Kenta-Oshiro:slab2-np/rep01/ex3] j06012%./myclient

12 Connected. warning: this program uses gets(), which is unsafe. Input Keyword = aka Keyword = [aka] / Data = [kuro] Input Keyword = abc Keyword = [abc] / Data = [ABC] Input Keyword = oshiro Keyword = [oshiro] / Data = [kenta] Input Keyword = yyyy Keyword = [yyyy] / Data = [zzzz] inetd(xinetd) inetd inetd inetd ~ ~ 4 :HTTP HTML WWW URL [ ] > httpget ( html ) *C telnet NNTP,SMTP,POP3 http get.c /*** TCP Client ***/ #include <stdio.h> #include <stdlib.h>

13 #include <ctype.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #define BUF_LEN 256 #define PORT 80 #define SERVICE_NAME "http" #define PROTOCOL "tcp" // // void Disconnect(int SocketNumber) close(socketnumber); void SendData(int SocketNumber,char *line) if(strlen(line)!= write(socketnumber,line,strlen(line))) printf("\7send Failed.\n"); int RecvData(int SocketNumber,char *line) int i; for(i = 0 ;;) if(1!= read(socketnumber,line + i,1)) continue; else i++; *(line + i) = (char)0; if(((char)( \n )) == *(line + i - 1)) return i; int main() int Sock; char path[buf_len]; char buff[buf_len]; // // HTTP

14 char HOST_NAME[BUF_LEN]; // int SocketNumber; /* Socket descripter */ struct servent *ServiceEntry; // (http ) struct hostent *HostEntry; // IP struct sockaddr_in sin; // /* Get Service Entry by Service-Name */ if((struct servent *)NULL == (ServiceEntry = getservbyname(service_name,protocol))) printf("\7no service [%s].\n",service_name); /* Get Host Entry by Host-Name */ printf("input www sin = "); gets(host_name); printf("\n"); if((struct hostent *)NULL == (HostEntry = gethostbyname(host_name))) printf("\7no Hosts [%s].\n",host_name); /* Get Socket */ if(0 > (SocketNumber = (socket(pf_inet,sock_stream,0)))) printf("\7cannot get Socket.\n"); bzero((char *)(&sin), sizeof(sin)); bcopy(hostentry->h_addr,&sin.sin_addr,hostentry->h_length); sin.sin_family = PF_INET; sin.sin_port = htons(port); if(0 > connect(socketnumber,(struct sockaddr *)(&sin),sizeof(sin))) printf("\7cannot Connect.\n"); Sock = SocketNumber; /* Connect */

15 printf("connected.\n"); char *p; printf("input Path = "); fflush(stdout); gets(path); if(0 == strlen(path)) Disconnect(Sock); printf("disocnnected.\n"); sprintf(buff,"get %s HTTP/1.0\r\n",path); SendData(Sock,buff); sprintf(buff,"host: %s:%d\r\n", HOST_NAME, PORT); SendData(Sock,buff); sprintf(buff,"\r\n"); SendData(Sock,buff); /* Send It! */ while (1) char buf[buf_len]; int size; size = read(sock, buf, BUF_LEN); if ( size > 0 ) write(1, buf, size); else break; Disconnect(Sock); printf("disocnnected.\n"); [Kenta-Oshiro:~/INFO-jikken2/network] j06012%./http_get warning: this program uses gets(), which is unsafe. Input www sin = Connected. Input Path = /index.html HTTP/ OK Date: Thu, 20 Dec :58:50 GMT sin: Apache/ (Unix) mod_ssl/ OpenSSL/0.9.7l PHP/5.1.2

16 Last-Modified: Tue, 11 Dec :40:24 GMT ETag: "14c fa00" Accept-Ranges: bytes Content-Length: Cache-Control: max-age=60 Expires: Thu, 20 Dec :59:50 GMT Connection: close Content-Type: text/html <HTML> <HEAD> <META http-equiv="content-type" content="text/html; charset=shift_jis"> <!--<META http-equiv="content-style-type" content="text/css">--> <META http-equiv="content-style-type" content="text/css"> <LINK rel="shortcut ICON" href="icon/fav-ie2.ico"> <!-- <link href="feed: rel="alternate" type="application/rss+xml" title="rss News Feed"/> --> ~~~~~~~~~~ ~~~~~~~~~~ 5 ( ) ( ok) ( ) netstat -l ( ) ( ) scan port #include <stdio.h> #include <ctype.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <stdlib.h> #define SERVICE_NAME "tcpinetd" #define PROTOCOL "tcp" #define HOST_NAME "localhost" #define BUF_LEN 256 int main(int argc, char *argv[]) int i;

17 int servsoc; struct hostent *servhost; struct sockaddr_in sin; char host[buf_len]; unsigned short port; // IP // printf("input host : "); gets(host); printf("\n"); /* (IP ) */ servhost = gethostbyname(host); if ( servhost == NULL ) fprintf(stderr, "[%s] IP \n", host); return(0); bzero(&sin, sizeof(sin)); sin.sin_family = AF_INET; bcopy(servhost->h_addr, &sin.sin_addr, servhost->h_length); /* well known port */ for(i=0; i<1024; i++) sin.sin_port = htons(i); if((servsoc = (socket(af_inet, SOCK_STREAM, 0)) < 0)) printf("\7cannot get Socket.\n"); if(connect(servsoc, (struct sockaddr *)(&sin), sizeof(sin)) < 0) else printf("port %d is open\n",i); close(servsoc); printf("\nport Scan end\n"); printf("disocnnected.\n"); [Kenta-Oshiro:~/INFO-jikken2/network] j06012%./scan_port warning: this program uses gets(), which is unsafe.

18 Input host : Port 22 is open Port 80 is open Port 106 is open Port 111 is open Port 311 is open Port 389 is open Port 427 is open Port 443 is open Port 548 is open Port 625 is open Port 1010 is open Port 1012 is open Port 1013 is open Port Scan end Disocnnected. 6 (2) ( ) gets() dmy gets gets TCP/IP [Kenta-Oshiro:~/INFO-jikken2/network] j06012%./bufovf before buf(len:0) = dmy(len:0) = warning: this program uses gets(), which is unsafe. hogehogehogehogehogehogehogehogehogehogehogehogehogehogehogehoge after buf(len:64) = hogehogehogehogehogehogehogehogehogehogehogehogehogehogehogehoge dmy(len:0) = Segmentation fault bufovf.c BUFLEN 30 Segmentation fault gets() dmy[]

19 gets() fgets() #include <stdlib.h> exit() #include <string.h> memset(),strlen() if ((rtn = gets(buf)) == NULL) if ((rtn = fgets(buf,buflen,stdin)) == NULL) [Kenta-Oshiro:~/INFO-jikken2/network] j06012%./mybufovf before buf(len:0) = dmy(len:0) = hogehogehogehogehogehogehogehogehogehogehogehogehogehogehogehoge after buf(len:29) = hogehogehogehogehogehogehogeh dmy(len:0) = OS 7 ( ) tcpv6c IPv4 IPv6 tcpc IPv4

20 tcpc.c gethostbyname() IP getservbyname() tcpv6c.c getaddrinfo() IP tcpc.c tcpv6c.c tcpv6c.c tcpc.c getaddrinfo() (JM Project ) getaddrinfo() getipnodebyname(), getipnodebyaddr(), getservbyname(), getservbyport() getaddrinfo() bind() connect(2) 8 [1]JM Project [2]Wikipedia [3]

1 telnet WWW 1.1 telnet WWW URL html 1.2 URL 1 % telnet 80 Trying 2001:2f8:1c:d048::850d: telnet: c

1 telnet WWW 1.1 telnet WWW URL html 1.2 URL 1   % telnet   80 Trying 2001:2f8:1c:d048::850d: telnet: c 2 065708F 2007 12 20 1 1 telnet WWW 1.1 telnet WWW URL html 1.2 URL 1 www.ie.u-ryukyu.ac.jp % telnet www.ie.u-ryukyu.ac.jp 80 Trying 2001:2f8:1c:d048::850d:3008... telnet: connect to address 2001:2f8:1c:d048::850d:3008:

More information

untitled

untitled RPC (( Remote Procedure Call (RPC: Message-Oriented Middleware (MOM) data-streaming =(protocol) A B A B Connection protocol = connection oriented protocol TCP (Transmission Control Protocol) connectionless

More information

IP L09( Tue) : Time-stamp: Tue 14:52 JST hig TCP/IP. IP,,,. ( ) L09 IP (2017) 1 / 28

IP L09( Tue) : Time-stamp: Tue 14:52 JST hig TCP/IP. IP,,,. ( )   L09 IP (2017) 1 / 28 L09(2017-11-21 Tue) : Time-stamp: 2017-11-21 Tue 14:52 JST hig TCP/IP. IP,,,. http://hig3.net L09 (2017) 1 / 28 9, IP, - L09 (2017) 2 / 28 C (ex. ) 1 TCP/IP 2 3 ( ) ( L09 (2017) 3 / 28 50+5, ( )50+5. (

More information

main main Makefile Makefile C.5 Makefile Makefile Makefile A Mech (TA ) 1. Web (http://www.jsk.t.u-tokyo.ac.jp/ iku

main main Makefile Makefile C.5 Makefile Makefile Makefile A Mech (TA ) 1. Web (http://www.jsk.t.u-tokyo.ac.jp/ iku 2008 (mizuuchi@i.u-tokyo.ac.jp) http://www.jsk.t.u-tokyo.ac.jp/ http://www.jsk.t.u-tokyo.ac.jp/ ikuo/enshu/keisanki/ 2008 5 19 6 24 1 2 2.1 my_sound.c, my_sounc.h, play.c, record.c 2 2. 2.2 2.2.1 main

More information

演算増幅器

演算増幅器 ネットワークプログラミングの続き前回はチャットを行うプログラムを作成し ネットワークを利用したプログラミングの基本について学んだ 本日は 前回作成したプログラムを改良していく 具体的には 以下の2つの項目について習っていく ホスト名や IP アドレスの取得の方法 fork() システムコールを使い 子プロセスを作成する方法 チャットプログラムの改良 前回のプログラムを以下のように改良していく 太字部分が変更部分である

More information

PowerPoint Presentation

PowerPoint Presentation 上級プログラミング 2( 第 1 回 ) 工学部情報工学科 木村昌臣 今日のテーマ 入出力に関わるプログラムの作り方 ネットワークプログラミングの続き TCP の場合のプログラム 先週のプログラムの詳細な説明 URLクラス サーバープログラムの例 データ入出力プログラミングの復習 テキストの読み込み関係のクラス テキストからデータを読み込むときには 通常 三段構えで行う バイナリデータとして読み出し

More information

untitled

untitled 2 1 Web 3 4 2 5 6 3 7 Internet = Inter Network 8 4 B B A B C A B C D D 9 A G D G F A B C D F D C D E F E F G H 10 5 11 Internet = Inter Network PC 12 6 1986 NSFNET 1995 1991 World Wide Web 1995 Windows95

More information

untitled

untitled Message Oriented Communication Remote Procedure Call (RPC: Message-Oriented Middleware (MOM) data-streaming persistent communication transient communication asynchronous communication synchronous communication

More information

3 3.1 LAN ISDN (IP) 2 TCP/UDP IP IP IP IP (Ethernet) Ethernet LAN TCP/UDP LAN Ethernet LAN 2: Ethernet ATM, FDDI, LAN IP IP IP 3 IP 2 IP IP IP IP IP 3

3 3.1 LAN ISDN (IP) 2 TCP/UDP IP IP IP IP (Ethernet) Ethernet LAN TCP/UDP LAN Ethernet LAN 2: Ethernet ATM, FDDI, LAN IP IP IP 3 IP 2 IP IP IP IP IP 3 IP 1 (IP) TCP/IP 1 2 2 1 LAN IP C IP 192.168.0.101 192.168.0.104 HUB 100Base-TX 100Mbps UTP Ethernet HUB 192.168.0.101 192.168.0.102 192.168.0.103 192.168.0.104 1: 6 1 3 3.1 LAN ISDN (IP) 2 TCP/UDP IP

More information

エラー処理・分割コンパイル・コマンドライン引数

エラー処理・分割コンパイル・コマンドライン引数 L10(2017-12-05 Tue) : Time-stamp: 2017-12-17 Sun 11:59 JST hig. recv/send http://hig3.net ( ) L10 (2017) 1 / 21 IP I swallow.math.ryukoku.ac.jp:13 = 133.83.83.6:13 = : IP ( = ) (well-known ports), :. :,.

More information

/*

/* アプリケーションの IPv6 対応ガイドライン 基礎編添付資料 アプリケーションの IPv6 化例示プログラム集 IPv6 普及 高度化推進協議会 IPv4/IPv6 共存 WG アプリケーションの IPv6 対応検討 SWG 2012 年 12 月 3 日 本文書について本文書は IPv6 普及 高度化推進協議会 IPv4/IPv6 共存 WG アプリケーションの IPv6 対応検討 SWG で編集した文書である

More information

演算増幅器

演算増幅器 ネットワークプログラミング ( 教科書 p.247-312) これまでに作成したプログラムは 1 台のコンピュータ上で動作するものだった 本日はネットワーク上の別のコンピュータで実行しているプログラムと通信をしながら動作するプログラムの作成方法について学ぶ ネットワークプログラミングを高度に使いこなすためには 関連する知識は幅広く求められる 本日からの学習では単純なチャット ( 会話 ) を行うプログラムを題材として

More information

wide94.dvi

wide94.dvi 14 WWW 397 1 NIR-TF UUCP ftp telnet ( ) WIDE Networked Information Retrieval( NIR ) vat(visual Audio Tool) nv(netvedeo) CERN WWW(World Wide Web) WIDE ISODE WIDE project WWW WWW 399 400 1994 WIDE 1 WIDE

More information

J.JSSAC Vol. 7, No. 2, Mathematica Maple,., Open asir Open xxx asir. Open xxx Open asir, asir., Open xxx, Linux Open asir Open sm1 (kan/sm1). C

J.JSSAC Vol. 7, No. 2, Mathematica Maple,., Open asir Open xxx asir. Open xxx Open asir, asir., Open xxx, Linux Open asir Open sm1 (kan/sm1). C J.JSSAC (1999) Vol. 7, No. 2, pp. 2-17 Open asir HPC (Received 1997/12/1) 1 Open asir Open xxx,., ( ),,,,,.,., (1) (2) (3) (4),. Open xxx,.,., 1.,.,., 0 10, dx,.,., ohara@math.kobe-u.ac.jp taka@math.kobe-u.ac.jp

More information

¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥°¥é¥ß¥ó¥°ÆÃÏÀ

¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥°¥é¥ß¥ó¥°ÆÃÏÀ 2 : TCP/IP : HTTP HTTP/2 1 / 22 httpget.txt: http.rb: ruby http get Java http ( ) HttpURLConnection 2 / 22 wireshark httpget.txt httpget cookie.txt ( ) telnet telnet localhost 80 GET /index.html HTTP/1.1

More information

目次 1. DB 更新情報受信 SW 仕様書 構成および機能 全体の構成 DB 更新情報受信 SW の機能 ソフトウェアの設計仕様 DB 更新情報受信 SW の仕様 資料編... 5

目次 1. DB 更新情報受信 SW 仕様書 構成および機能 全体の構成 DB 更新情報受信 SW の機能 ソフトウェアの設計仕様 DB 更新情報受信 SW の仕様 資料編... 5 書類トレースシステム DigiTANAlog メインサーバマシン DB 更新情報受信 SW 仕様書 Create on 良知洋志 (RACHI, Hiroshi) Date: 2006/02/08 Last Update: 2006/02/15 目次 1. DB 更新情報受信 SW 仕様書... 2 1-1. 構成および機能...2 1-1-1. 全体の構成...2 1-1-2. DB 更新情報受信

More information

BSDソケットによるIPv6プログラミングを紐解く

BSDソケットによるIPv6プログラミングを紐解く BSD Socket による IPv6 プログラミングを 紐解く 株式会社リコー研究開発本部基盤技術開発センター大平浩貴 ( おおひらこうき ) 1 自己紹介 1999 年頃から IPv6 にかかわる IETF 行ったり 端末 OS 触ったり 複合機のネットワークを触ったり IPsecやったり プログラミングはあまり得意ではないけど 2 今回の説明の概要 通信プログラムの基本 BSD Socket

More information

TCP UDP TCP UDP send()sendto()sendmsg() recv()recvfrom()recvmsg() OS Passive Active TCP UDP IP TCP UDP MTAMail Transf

TCP UDP TCP UDP send()sendto()sendmsg() recv()recvfrom()recvmsg() OS Passive Active TCP UDP IP TCP UDP MTAMail Transf 3 -- 7 2011 2 TCPUDP APIApplication Programming Interface BSD UNIX C System V UNIX XTIX /Open Transport Interface XTI TCP/IP ISO OSI XTI TCP/IP OSI TCP UDP API API API API UNIX Windows 7-1 TCP UDP 7-2

More information

Microsoft Word - EGX100によるH663通信手引

Microsoft Word - EGX100によるH663通信手引 PowerLogic EthernetGateway(EGX100) による H663 データ取得早分かり手引き 2011 年 11 月 11 日 JAVASYS 1. 概要 H663 は RS-485 によって上位機と通信し データのやりとりを行います 本仕様書は PowerLogic EthernetGateway(EGX100) によるデータ取得の開発に関して簡単な手引きを記述します EGX100

More information

lexex.dvi

lexex.dvi (2018, c ) http://istksckwanseiacjp/ ishiura/cpl/ 4 41 1 mini-c lexc,, 2 testlexc, lexc mini-c 1 ( ) mini-c ( ) (int, char, if, else, while, return 6 ) ( ) (+, -, *, /, %, &, =, ==,!=, >, >=,

More information

実験 6 通信基礎実験 1 目的 ネットワークを通じてデータ転送を行うことを体験的に学ぶために 本実験ではT CP/IPプロトコルを使い ワークステーション間で通信を行うクライアントサーバモデルのプログラムを作成する 2 解説 1 ネットワークとプロトコルネットワーク ( コンピュータネットワーク

実験 6 通信基礎実験 1 目的 ネットワークを通じてデータ転送を行うことを体験的に学ぶために 本実験ではT CP/IPプロトコルを使い ワークステーション間で通信を行うクライアントサーバモデルのプログラムを作成する 2 解説 1 ネットワークとプロトコルネットワーク ( コンピュータネットワーク 実験 6 通信基礎実験 1 目的 ネットワークを通じてデータ転送を行うことを体験的に学ぶために 本実験ではT CP/IPプロトコルを使い ワークステーション間で通信を行うクライアントサーバモデルのプログラムを作成する 2 解説 1 ネットワークとプロトコルネットワーク ( コンピュータネットワーク ) とは2 台以上のコンピュータが何らかの線でつながったものである しかし 線で接続されているだけではコンピュータ間で通信を行うことが出来ず

More information

DA100データアクイジションユニット通信インタフェースユーザーズマニュアル

DA100データアクイジションユニット通信インタフェースユーザーズマニュアル Instruction Manual Disk No. RE01 6th Edition: November 1999 (YK) All Rights Reserved, Copyright 1996 Yokogawa Electric Corporation 801234567 9 ABCDEF 1 2 3 4 1 2 3 4 1 2 3 4 1 2

More information

r08.dvi

r08.dvi 19 8 ( ) 019.4.0 1 1.1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( ) 1 next 1 prev 1 head cur tail head cur prev

More information

ohp08.dvi

ohp08.dvi 19 8 ( ) 2019.4.20 1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: 2 (2) NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( 2) 3 (3) head cur tail head cur prev data

More information

1) // 2) I/O 3) Japan Advanced Institute of Science and Technology 2013/07/26 1

1) // 2) I/O 3) Japan Advanced Institute of Science and Technology 2013/07/26 1 I441 2013/07/26 Dependable Network Innovation Center, Japan Advanced Institute of Science and Technology 1) // 2) I/O 3) Japan Advanced Institute of Science and Technology 2013/07/26 1 1) Comer: Internetworking

More information

SOC Report

SOC Report 多段プロキシによる Tor の Exit ノードの隠蔽について N T T コ ミ ュ ニ ケ ー シ ョ ン ズ株式会社 経営企画部 マネージドセキュリティサービス推進室 セ キ ュ リ テ ィ オ ペ レ ー シ ョ ン担当 2013 年 03 月 15 日 Ver. 1.0 1. 調査概要... 3 1.1. 調査概要... 3 2. 注意事項... 3 3. 検証結果... 3 3.1. 検証環境...

More information

I. Backus-Naur BNF : N N 0 N N N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) (2) (3) (4) II. 0(0 101)* (

I. Backus-Naur BNF : N N 0 N N N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) (2) (3) (4) II. 0(0 101)* ( 2016 2016 07 28 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF : 11011 N N 0 N N 11 1001 N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) 1100100 (2) 1111011 (3) 1110010 (4) 1001011

More information

I. Backus-Naur BNF S + S S * S S x S +, *, x BNF S (parse tree) : * x + x x S * S x + S S S x x (1) * x x * x (2) * + x x x (3) + x * x + x x (4) * *

I. Backus-Naur BNF S + S S * S S x S +, *, x BNF S (parse tree) : * x + x x S * S x + S S S x x (1) * x x * x (2) * + x x x (3) + x * x + x x (4) * * 2015 2015 07 30 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF S + S S * S S x S +, *, x BNF S (parse tree) : * x + x x S * S x + S S S x x (1) * x x * x (2) * + x x x (3) +

More information

buho210.dvi

buho210.dvi int fp7220::opensocket( void ) { struct hostent *hp; struct sockaddr_in sin; unsigned timeout; int result, s; } // make socket if (!(hp = gethostbyname(szserverloc)) ) return -1; if ( (s = socket(af_inet,

More information

卒 業 研 究 報 告.PDF

卒 業 研 究 報 告.PDF C 13 2 9 1 1-1. 1-2. 2 2-1. 2-2. 2-3. 2-4. 3 3-1. 3-2. 3-3. 3-4. 3-5. 3-5-1. 3-5-2. 3-6. 3-6-1. 3-6-2. 4 5 6 7-1 - 1 1 1-1. 1-2. ++ Lisp Pascal Java Purl HTML Windows - 2-2 2 2-1. 1972 D.M. (Dennis M Ritchie)

More information

超初心者用

超初心者用 3 1999 10 13 1. 2. hello.c printf( Hello, world! n ); cc hello.c a.out./a.out Hello, world printf( Hello, world! n ); 2 Hello, world printf n printf 3. ( ) int num; num = 100; num 100 100 num int num num

More information

program.dvi

program.dvi 2001.06.19 1 programming semi ver.1.0 2001.06.19 1 GA SA 2 A 2.1 valuename = value value name = valuename # ; Fig. 1 #-----GA parameter popsize = 200 mutation rate = 0.01 crossover rate = 1.0 generation

More information

通信プログラムの試作ーーー UDP を用いたじゃんけんゲームシステム ーーーー裘彬濱 南山大学情報理工学部 ソフトウェア工学科青山研究室

通信プログラムの試作ーーー UDP を用いたじゃんけんゲームシステム ーーーー裘彬濱 南山大学情報理工学部 ソフトウェア工学科青山研究室 通信プログラムの試作ーーー UDP を用いたじゃんけんゲームシステム ーーーー裘彬濱 南山大学情報理工学部 ソフトウェア工学科青山研究室 1:UDP を用いたじゃんけんゲームシステムの概要 本システムは通信プロトコル UDP を用いた簡単なじゃんけんゲームシステムであり 単一のユーザ ( クライアント ) が参加し パソコン ( サーバ ) とじゃんけんゲームするシステムである 本システムはユーザがゲームに参加できる時間を制限しており

More information

~/WWW-local/compIID (WWW IID ) $ mkdir WWW-local $ cd WWW-local $ mkdir compiid 3. Emacs index.html n (a) $ cd ~/WWW/compIID

~/WWW-local/compIID (WWW IID ) $ mkdir WWW-local $ cd WWW-local $ mkdir compiid 3. Emacs index.html n (a) $ cd ~/WWW/compIID 10 10 10.1 1. 2. 3. HTML(HyperText Markup Language) Web [ ][ ] HTML Web HTML HTML Web HTML ~b08a001/www/ ( ) ~b08a001/www-local/ ( ) html ( ) 10.2 WWW WWW-local b08a001 ~b08a001/www/ ~b08a001/www-local/

More information

4 実験結果 // 用意されたヘッダファイル #include < stdio.h> #include < fcntl.h> #include < netdb.h> #include < sys/types.h> #include < sys/socket.h> #include < sys/sta

4 実験結果 // 用意されたヘッダファイル #include < stdio.h> #include < fcntl.h> #include < netdb.h> #include < sys/types.h> #include < sys/socket.h> #include < sys/sta 実験 6 通信基礎実験 2 1 目的 ネットワークを通じてデータ転送を行うことを体験的に学ぶために 本実験ではT CP/IPプロトコルを使い ワークステーション間で通信を行うクライアントサーバモデルのプログラムを作成する 今回は文字データだけでなく 音声データも使う事により より実践的なプログラミングを行う 2 解説 前実験と同様なので省略する 3 実験 実験 1で作成したプログラムを利用して マイクから入力した音声信号をサーバへ送信するクライアントプログラムを作成せよ

More information

:30 12:00 I. I VI II. III. IV. a d V. VI

:30 12:00 I. I VI II. III. IV. a d V. VI 2017 2017 08 03 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF X [ S ] a S S ; X X X, S [, a, ], ; BNF X (parse tree) (1) [a;a] (2) [[a]] (3) [a;[a]] (4) [[a];a] : [a] X 2 222222

More information

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1 I117 II I117 PROGRAMMING PRACTICE II 2 MEMORY MANAGEMENT 2 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara yasu@jaist.ac.jp / SCHEDULE 1. 2011/06/07(Tue) / Basic of Programming

More information

Makefile, TCPソケットサーバ, コマンドライン引数

Makefile, TCPソケットサーバ, コマンドライン引数 L11(2017-12-12 Tue) : Time-stamp: 2017-12-22 Fri 12:28 JST hig ( ) make http://hig3.net L11 (2017) 1 / 24 I, void die(char message) void die(char message[])... 1 #i n c l u d e 2 / / 3 double

More information

r07.dvi

r07.dvi 19 7 ( ) 2019.4.20 1 1.1 (data structure ( (dynamic data structure 1 malloc C free C (garbage collection GC C GC(conservative GC 2 1.2 data next p 3 5 7 9 p 3 5 7 9 p 3 5 7 9 1 1: (single linked list 1

More information

ohp07.dvi

ohp07.dvi 19 7 ( ) 2019.4.20 1 (data structure) ( ) (dynamic data structure) 1 malloc C free 1 (static data structure) 2 (2) C (garbage collection GC) C GC(conservative GC) 2 2 conservative GC 3 data next p 3 5

More information

r4.dvi

r4.dvi 16 4 2016.5.11 1 1.1 :? PC LAN Web?? ( ) [4] [5] my PC [2] congested service [1]? [3] 1: LAN LAN ( )[1] LAN ( ) PC ( )[2] Web ( )[3] ping ( ) ( )[4] SSL ( ) ( / / )[5] 1 1.2 (multiple layered-structure)

More information

<4D F736F F F696E74202D D54352D6B61746F2D D B82C988CB91B682B582C882A2835C D834F E F205B8CDD8AB B83685D>

<4D F736F F F696E74202D D54352D6B61746F2D D B82C988CB91B682B582C882A2835C D834F E F205B8CDD8AB B83685D> Internet Week 2011 チュートリアル T5 IPv4 アドレス枯渇時代のアプリケーション開発 プロトコル非依存の ソケットプログラミングの基礎 NTTサービスインテグレーション基盤研究所加藤淳也 2011 年 12 月 1 日 1 2011 NTT Service Integration Laboratories アウトライン 1. 本チュートリアルの目的 2. プロトコルに依存しないアプリケーション

More information

soturon2013

soturon2013 4.4. CGI, CGI Web. UNIX, UNIX Windows. UNIX CGI. i ( ). mi- http://www.mimikaki.net/ 67 (mi- ),mi-, http://ugawalab.miyakyo-u.ac.jp/j3/chika/wari.cgi.txt http://ugawalab.miyakyo-u.ac.jp/j3/chika/wari.cgi.txt,.

More information

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B A/B (2018/10/19) Ver. 1.0 kurino@math.cst.nihon-u.ac.jp http://edu-gw2.math.cst.nihon-u.ac.jp/ kurino/2018/soft/soft.html 2018 10 19 A/B 1 2018 10 19 2 1 1 1.1 OHP.................................... 1

More information

:30 12:00 I. I VI II. III. IV. a d V. VI

:30 12:00 I. I VI II. III. IV. a d V. VI 2018 2018 08 02 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF N N y N x N xy yx : yxxyxy N N x, y N (parse tree) (1) yxyyx (2) xyxyxy (3) yxxyxyy (4) yxxxyxxy N y N x N yx

More information

ohp03.dvi

ohp03.dvi 19 3 ( ) 2019.4.20 CS 1 (comand line arguments) Unix./a.out aa bbb ccc ( ) C main void int main(int argc, char *argv[]) {... 2 (2) argc argv argc ( ) argv (C char ) ( 1) argc 4 argv NULL. / a. o u t \0

More information

CM-3G 周辺モジュール拡張技術文書 MS5607センサ(温度、気圧)

CM-3G 周辺モジュール拡張技術文書 MS5607センサ(温度、気圧) CM-3G 周辺モジュール拡張技術文書 MS5607 センサ ( 温度 気圧 ) ( 第 1 版 ) Copyright (C)2016 株式会社コンピューテックス 目次 1. はじめに... 1 2. MS5607 について... 1 3. 接続図... 1 4. アプリケーション ソース... 2 5. アプリケーションのコンパイル方法... 7 6. アプリケーションの実行... 8 1. はじめに

More information

演習室の PC のハードディスクには演習で作成したデータは保管できません 各 PC の ネットワーク接続 ショートカットからメディア情報センターのサーバーにアクセスしてください (Z ドライブとして使用できます ) 講義で使うフォルダ 2/23

演習室の PC のハードディスクには演習で作成したデータは保管できません 各 PC の ネットワーク接続 ショートカットからメディア情報センターのサーバーにアクセスしてください (Z ドライブとして使用できます ) 講義で使うフォルダ 2/23 Web データ管理 CGI (3 章 ) 2011/11/30( 水 ) 1/23 演習室の PC のハードディスクには演習で作成したデータは保管できません 各 PC の ネットワーク接続 ショートカットからメディア情報センターのサーバーにアクセスしてください (Z ドライブとして使用できます ) 講義で使うフォルダ 2/23 CGI とは Common Gateway Interface の略 通常のページでは

More information

演習室の PC のハードディスクには演習で作成したデータは保管できません 各 PC の ネットワーク接続 ショートカットからメディア情報センターのサーバーにアクセスしてください (Z ドライブとして使用できます ) Web プログラミング 1 CGI (3 章 ) 2012/6/12( 水 ) 講義

演習室の PC のハードディスクには演習で作成したデータは保管できません 各 PC の ネットワーク接続 ショートカットからメディア情報センターのサーバーにアクセスしてください (Z ドライブとして使用できます ) Web プログラミング 1 CGI (3 章 ) 2012/6/12( 水 ) 講義 演習室の PC のハードディスクには演習で作成したデータは保管できません 各 PC の ネットワーク接続 ショートカットからメディア情報センターのサーバーにアクセスしてください (Z ドライブとして使用できます ) Web プログラミング 1 CGI (3 章 ) 2012/6/12( 水 ) 講義で使うフォルダ 1/23 2/23 CGI とは Common Gateway Interface の略

More information

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D II 8 2003 11 12 1 6 ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 Daisuke 8 =>. 73 Daisuke 35 Hiroshi 64 Ichiro 87 Junko

More information

double float

double float 2015 3 13 1 2 2 3 2.1.......................... 3 2.2............................. 3 3 4 3.1............................... 4 3.2 double float......................... 5 3.3 main.......................

More information

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV tutimura@mist.i.u-tokyo.ac.jp kaneko@ipl.t.u-tokyo.ac.jp http://www.misojiro.t.u-tokyo.ac.jp/ tutimura/sem3/ 2002 11 20 p.1/34 10/16 1. 10/23 2. 10/30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20

More information

Original : Hello World! (0x0xbfab85e0) Copy : Hello World! (0x0x804a050) fgets mstrcpy malloc mstrcpy (main ) mstrcpy malloc free fgets stream 1 ( \n

Original : Hello World! (0x0xbfab85e0) Copy : Hello World! (0x0x804a050) fgets mstrcpy malloc mstrcpy (main ) mstrcpy malloc free fgets stream 1 ( \n 2008 3 10 1 mstrcpy char *mstrcpy(const char *src); mstrcpy malloc (main free ) stdio.h fgets char *fgets(char *s, int size, FILE *stream); s size ( ) stream FILE ( man ) 40 ( ) %./a.out String : test

More information

: CR (0x0d) LF (0x0a) line separator CR Mac LF UNIX CR+LF MS-DOS WINDOWS Japan Advanced Institute of Science and Technology

: CR (0x0d) LF (0x0a) line separator CR Mac LF UNIX CR+LF MS-DOS WINDOWS Japan Advanced Institute of Science and Technology I117 8 1 School of Information Science, Japan Advanced Institute of Science and Technology : CR (0x0d) LF (0x0a) line separator CR Mac LF UNIX CR+LF MS-DOS WINDOWS Japan Advanced Institute of Science and

More information

プロセス

プロセス プロセス 分散システム 2009 年 12 月 15 日 建部修見 プロセス プロセス 独立したプログラムの実行 互いに影響を及ぼさない ( 同一 CPU を透明に利用, 並行透明性 ) 独立した論理アドレス空間をもつ プロセステーブル CPU レジスタメモリマップオープンファイルアカウント情報権限 (privileges) プロセス生成とプロセス切替 プロセス生成 論理アドレス空間の生成 メモリセグメントの初期化

More information

1.ppt

1.ppt /* * Program name: hello.c */ #include int main() { printf( hello, world\n ); return 0; /* * Program name: Hello.java */ import java.io.*; class Hello { public static void main(string[] arg)

More information

II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C main main 1 NULL NULL for 2 (a) Yacc 2 (b) 2 3 y

II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C main main 1 NULL NULL for 2 (a) Yacc 2 (b) 2 3 y II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C 1 6 9 1 main main 1 NULL NULL 1 15 23 25 48 26 30 32 36 38 43 45 47 50 52 for 2 (a) 2 2 1 Yacc 2 (b) 2 3 yytext tmp2 ("") tmp2->next->word tmp2 yytext tmp2->next->word

More information

(Microsoft Word - BBT\216\346\220\340SiTCP-VME-Master_Rev11_.doc)

(Microsoft Word - BBT\216\346\220\340SiTCP-VME-Master_Rev11_.doc) SITCP VME-MASTER MODULE 取扱説明書 Rev 1.1 (Jan. 25, 2010) Tomohisa Uchida 1 変更履歴 Rev 変更日 変更ページ 変更内容 0.4 2008 年 2 月 13 日 P12 Address Fix モード時の制限事項を追加 0.5 2008 年 2 月 14 日 P3, 11 非整列転送の非サポートを明記 1.0 2008/04/04

More information

ÉvÉçPM_02

ÉvÉçPM_02 2 JavaScript 2JavaScript JavaScript 2-11hello1.html hello

More information

プロセス

プロセス プロセス 分散システム 2012 年 12 月 25 日 建部修見 プロセス 独立したプログラムの実行 互いに影響を及ぼさない ( 同一 CPU を透明に利用, 並行透明性 ) 独立した論理アドレス空間をもつ プロセステーブル CPU レジスタメモリマップオープンファイルアカウント情報権限 (privileges) プロセス生成とプロセス切替 プロセス生成 論理アドレス空間の生成 メモリセグメントの初期化

More information

Apache Web Server 2 Compaq ActiveAnswers Deskpro Compaq Insight Manager Fastart Systempro Systempro/LT ProLiant ROMPaq Qvision SmartStart NetFlex Quic

Apache Web Server 2 Compaq ActiveAnswers Deskpro Compaq Insight Manager Fastart Systempro Systempro/LT ProLiant ROMPaq Qvision SmartStart NetFlex Quic Technical Guide 1999 5 Internet and E-Commerce Solutions Business Unit Enterprise Solutions Division Apache Web Server Compaq Linux Apache HTTP Compaq Computer Corporation...3...3...4...5...6...7...7...7...8...10...10...16...16

More information

file"a" file"b" fp = fopen("a", "r"); while(fgets(line, BUFSIZ, fp)) {... fclose(fp); fp = fopen("b", "r"); while(fgets(line, BUFSIZ, fp)) {... fclose

filea fileb fp = fopen(a, r); while(fgets(line, BUFSIZ, fp)) {... fclose(fp); fp = fopen(b, r); while(fgets(line, BUFSIZ, fp)) {... fclose I117 9 2 School of Information Science, Japan Advanced Institute of Science and Technology file"a" file"b" fp = fopen("a", "r"); while(fgets(line, BUFSIZ, fp)) {... fclose(fp); fp = fopen("b", "r"); while(fgets(line,

More information

thesis.dvi

thesis.dvi H8 e041220 2009 2 Copyright c 2009 by Kentarou Nagashima c 2009 Kentarou Nagashima All rights reserved , H8.,,,..,.,., AKI-H8/3052LAN. OS. OS H8 Write Turbo. H8 C, Cygwin.,., windows. UDP., (TA7279P).,.

More information

新・明解C言語 実践編

新・明解C言語 実践編 第 1 章 見 21 1-1 見えないエラー 見 List 1-1 "max2x1.h" a, b max2 List 1-1 chap01/max2x1.h max2 "max2x1.h" #define max2(a, b) ((a) > (b)? (a) : (b)) max2 List 1-2 List 1-2 chap01/max2x1test.c max2 #include

More information

ex14.dvi

ex14.dvi 1,, 0, b (b b 2 b ) n k n = n j b j, (0 n j b 1), n =(n k n k 1...n 1 n 0 ) b, n j j j +1, 0,...,b 1 (digit). b b, n b 1 ñ, ñ = k (b 1 n j )b j b N, n b n, n = b N n, n =ñ+1 b N, n m n + m (mod b N ),

More information

comment.dvi

comment.dvi ( ) (sample1.c) (sample1.c) 2 2 Nearest Neighbor 1 (2D-class1.dat) 2 (2D-class2.dat) (2D-test.dat) 3 Nearest Neighbor Nearest Neighbor ( 1) 2 1: NN 1 (sample1.c) /* -----------------------------------------------------------------

More information

r03.dvi

r03.dvi 19 ( ) 019.4.0 CS 1 (comand line arguments) Unix./a.out aa bbb ccc ( ) C main void... argc argv argc ( ) argv (C char ) ( 1) argc 4 argv NULL. / a. o u t \0 a a \0 b b b \0 c c c \0 1: // argdemo1.c ---

More information

6 2 1

6 2 1 6 1 6 (1) (2) HTML (3) 1 Web HTML 1 Web 1 Web Web 6 2 1 6 3 1.1 HTML(XHTML) Web HTML(Hyper Text Markup Language) ( ) html htm HTML XHTML(XHTML 1.0 Transitional)

More information

新版明解C言語 実践編

新版明解C言語 実践編 2 List - "max.h" a, b max List - max "max.h" #define max(a, b) ((a) > (b)? (a) : (b)) max List -2 List -2 max #include "max.h" int x, y; printf("x"); printf("y"); scanf("%d", &x); scanf("%d", &y); printf("max(x,

More information

1 C STL(1) C C C libc C C C++ STL(Standard Template Library ) libc libc C++ C STL libc STL iostream Algorithm libc STL string vector l

1 C STL(1) C C C libc C C C++ STL(Standard Template Library ) libc libc C++ C STL libc STL iostream Algorithm libc STL string vector l C/C++ 2007 6 18 1 C STL(1) 2 1.1............................................... 2 1.2 stdio................................................ 3 1.3.......................................... 10 2 11 2.1 sizeof......................................

More information

新・明解C言語 ポインタ完全攻略

新・明解C言語 ポインタ完全攻略 2 1-1 1-1 /* 1-1 */ 1 int n = 100; int *p = &n; printf(" n %d\n", n); /* n int */ printf("*&n %d\n", *&n); /* *&n int */ printf(" p %p\n", p); /* p int * */ printf("&*p %p\n", &*p); /* &*p int * */ printf("sizeof(n)

More information

r4.dvi

r4.dvi 11 4 2010.5.11 1 1.1 :???? ( : ) ( 1)? 1:? Google Web www.museuhistoriconacional.com.br ping % /sbin/ping www.museuhistoriconacional.com.br PING museuhistoriconacional.com.br (200.198.87.5): 56 data bytes

More information

Taro-ファイル処理(公開版).jtd

Taro-ファイル処理(公開版).jtd ファイル処理 0. 目次 1. はじめに 2. ファイル内容の表示 3. ファイル内容の複写 3. 1 文字単位 3. 2 行単位 4. 書式付き入出力 5. 文字配列への入出力 6. 課題 6. 1 課題 1 ( ファイル圧縮 復元 ) - 1 - 1. はじめに ファイル処理プログラムの形は次のようになる #include main() { FILE *fp1,*fp2; ファイルポインタの宣言

More information

1-4 int a; std::cin >> a; std::cout << "a = " << a << std::endl; C++( 1-4 ) stdio.h iostream iostream.h C++ include.h 1-4 scanf() std::cin >>

1-4 int a; std::cin >> a; std::cout << a =  << a << std::endl; C++( 1-4 ) stdio.h iostream iostream.h C++ include.h 1-4 scanf() std::cin >> 1 C++ 1.1 C C++ C++ C C C++ 1.1.1 C printf() scanf() C++ C hello world printf() 1-1 #include printf( "hello world\n" ); C++ 1-2 std::cout

More information

演習室の PC のハードディスクには演習で作成したデータは保管できません 各 PC の ネットワーク接続 ショートカットからメディア情報センターのサーバーにアクセスしてください (Z ドライブとして使用できます ) 演習名 使用するフォルダ 演習 1 Z: Web データ管理 演習

演習室の PC のハードディスクには演習で作成したデータは保管できません 各 PC の ネットワーク接続 ショートカットからメディア情報センターのサーバーにアクセスしてください (Z ドライブとして使用できます ) 演習名 使用するフォルダ 演習 1 Z: Web データ管理 演習 Web データ管理 JavaScript (4) (4 章 ) 2012/1/11( 水 ) 1/22 演習室の PC のハードディスクには演習で作成したデータは保管できません 各 PC の ネットワーク接続 ショートカットからメディア情報センターのサーバーにアクセスしてください (Z ドライブとして使用できます ) 演習名 使用するフォルダ 演習 1 Z: Web データ管理 20120111 演習

More information

BW BW

BW BW Induced Sorting BW 11T2042B 2015 3 23 1 1 1.1................................ 1 1.2................................... 1 2 BW 1 2.1..................................... 2 2.2 BW.................................

More information

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() 2 double *a[ ]; double 1 malloc() dou

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() 2 double *a[ ]; double 1 malloc() dou 1 1.1 C 2 1 double a[ ][ ]; 1 3x3 0 1 3x3 ( ) 0.240 0.143 0.339 0.191 0.341 0.477 0.412 0.003 0.921 1.2 malloc() 2 double *a[ ]; double 1 malloc() double 1 malloc() free() 3 #include #include

More information

計算機プログラミング

計算機プログラミング プログラミング言語 C 第 8 講 システム標準関数 ( 入出力関数 ) システム標準関数 システムに備え付けの関数 例 ) printf( ); scanf( ); 標準出力関数 標準入力関数 A. 入出力用の関数 高水準入出力関数 高水準言語 (OS に依存しない ) 低水準入出力関数 機械語レベル (OS に依存 ) B. それ以外の関数 引数と関数の型 ( 戻り値 ) に注目しましょう 例

More information

ex12.dvi

ex12.dvi 1 0. C, char., char, 0,. C, ("),., char str[]="abc" ; str abc.,, str 4. str 3. char str[10]="abc" ;, str 10, str 3., char s[]="abc", t[10] ;, t = s. ASCII, 0x00 0x7F, char., "abc" 3, 1. 1 8 256, 2., 2

More information

slide5.pptx

slide5.pptx ソフトウェア工学入門 第 5 回コマンド作成 1 head コマンド作成 1 早速ですが 次のプログラムを head.c という名前で作成してください #include #include static void do_head(file *f, long nlines); int main(int argc, char *argv[]) { if (argc!=

More information

1 $ cat aboutipa 2 IPA is a Japanese quasi-government 3 organization established in accor- 4 dance with The Law for Information 5 Processing Technolog

1 $ cat aboutipa 2 IPA is a Japanese quasi-government 3 organization established in accor- 4 dance with The Law for Information 5 Processing Technolog 1 $ cat aboutipa 2 IPA is a Japanese quasi-government 3 organization established in accor- 4 dance with The Law for Information 5 Processing Technology Promotion, 6 (Law No.90, May 22, 1979). 7 $./upper

More information

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() malloc 2 #include <stdio.h> #include

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() malloc 2 #include <stdio.h> #include 1 1.1 C 2 1 double a[ ][ ]; 1 3x3 0 1 3x3 ( ) 0.240 0.143 0.339 0.191 0.341 0.477 0.412 0.003 0.921 1.2 malloc() malloc 2 #include #include #include enum LENGTH = 10 ; int

More information

55 7 Java C Java TCP/IP TCP/IP TCP TCP_RO.java import java.net.*; import java.io.*; public class TCP_RO { public static void main(string[] a

55 7 Java C Java TCP/IP TCP/IP TCP TCP_RO.java import java.net.*; import java.io.*; public class TCP_RO { public static void main(string[] a 55 7 Java C Java TCP/IP TCP/IP 7.1 7.1.1 TCP TCP_RO.java import java.net.*; import java.io.*; public class TCP_RO { public static void main(string[] argv) { Socket readsocket = new Socket(argv[0], Integer.parseInt(argv[1]));

More information

内容 WWWとは ブラウザ 検索エンジン HTML 自分のホームページ作成

内容 WWWとは ブラウザ 検索エンジン HTML 自分のホームページ作成 情報処理演習 WWW とホームページ 内容 WWWとは ブラウザ 検索エンジン HTML 自分のホームページ作成 WWW の生い立ち CERN : Conseil Europeen pour la Recherche Nucleaire 加速器を使った研究成果としてのデータを世界中で共用する仕組みが必要 1990 年頃に提案 実装 (NeXT) 1990 年中頃から急速に普及 WWW の特徴 使い易いので

More information

ii II Web Web HTML CSS PHP MySQL Web Web CSS JavaScript Web SQL Web 2014 3

ii II Web Web HTML CSS PHP MySQL Web Web CSS JavaScript Web SQL Web 2014 3 Web 2.0 Web Web Web Web Web Web Web I II I ii II Web Web HTML CSS PHP MySQL Web Web CSS JavaScript Web SQL Web 2014 3 1. 1.1 Web... 1 1.1.1... 3 1.1.2... 3 1.1.3... 4 1.2... 4 I 2 5 2. HTMLCSS 2.1 HTML...

More information

XMPによる並列化実装2

XMPによる並列化実装2 2 3 C Fortran Exercise 1 Exercise 2 Serial init.c init.f90 XMP xmp_init.c xmp_init.f90 Serial laplace.c laplace.f90 XMP xmp_laplace.c xmp_laplace.f90 #include int a[10]; program init integer

More information

double 2 std::cin, std::cout 1.2 C fopen() fclose() C++ std::fstream 1-3 #include <fstream> std::fstream fout; int a = 123; fout.open( "data.t

double 2 std::cin, std::cout 1.2 C fopen() fclose() C++ std::fstream 1-3 #include <fstream> std::fstream fout; int a = 123; fout.open( data.t C++ 1 C C++ C++ C C C++ 1.1 C printf() scanf() C++ C 1-1 #include int a; scanf( "%d", &a ); printf( "a = %d\n", a ); C++ 1-2 int a; std::cin >> a; std::cout

More information

dvi

dvi { SSH { 3 3 1 telnet ID ( ) ID ( 1) SSH(Secure SHell) (ID ) SSH SSH SSH login : userid password : himitsu login : userid psaaword: himitsu login : userid password : himitsu 1. Host 11 7 UNIX ( sakura)

More information

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裶²ó ¨¡ À©¸æ¹½Â¤¡§·«¤êÊÖ¤· ¨¡

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裶²ó  ¨¡ À©¸æ¹½Â¤¡§·«¤êÊÖ¤· ¨¡ (2018) 2018 5 24 ( ) while ( ) do while ( ); for ( ; ; ) while int i = 0; while (i < 100) { printf("i = %3d\n", i); i++; while int i = 0; i while (i < 100) { printf("i = %3d\n", i); i++; while int i =

More information

$ sudo apt-get install libavahi-compat-libdnssd-dev $ sudo apt-get autoremove nodejs $ wget http://nodejs.org/dist/latest/node-v7.6.0-linux-armv7l.tar.gz $ tar xzf node-v7.6.0-linux-armv7l.tar.gz $ sudo

More information

PowerPoint Presentation

PowerPoint Presentation ファイルの入出力 芝浦工業大学情報工学科 青木義満 今回の講義内容 ファイル入出力 ファイルからのデータ読込み ファイルと配列 2 1 ファイルへのデータ書き込み ( 復習 ) ソースファイル名 :fileio1.c データをファイルに書き込み #include int main(void) { ファイルポインタ宣言 int student_id = 100; char name[

More information

C言語によるアルゴリズムとデータ構造

C言語によるアルゴリズムとデータ構造 Algorithms and Data Structures in C 4 algorithm List - /* */ #include List - int main(void) { int a, b, c; int max; /* */ Ÿ 3Ÿ 2Ÿ 3 printf(""); printf(""); printf(""); scanf("%d", &a); scanf("%d",

More information

ネットワーク実験

ネットワーク実験 ネットワーク実験 ソケットを用いたネットワークプログラミング実習 1 シラバス [ 授業の概要 ] 授業科目 ネットワーク実験 の1 課題として, ソケットを用いたクライアント サーバプログラミングの実習を行い, ネットワークアプリケーションプログラミングの基礎を学習する. [ 授業の内容 ] 1.TCP/IPプロトコルとソケットの基礎 2. ソケットを用いたコネクションレス型クライアント / サーバネットワークプログラミング

More information

JIS Web Web JIS JIS 5.1.a 5.1.b 5.2.a 5.2.b 5.2.c 5.2.d 5.2.e 5.2.f 5.2.g 5.3.a 5.3.b 5.3.c 5.3.d 5.3.e 5.3.f 5.3.g 5.3.h 5.3.i 5.4.a 5.4.b 5.4.c 5.4.

JIS Web Web JIS JIS 5.1.a 5.1.b 5.2.a 5.2.b 5.2.c 5.2.d 5.2.e 5.2.f 5.2.g 5.3.a 5.3.b 5.3.c 5.3.d 5.3.e 5.3.f 5.3.g 5.3.h 5.3.i 5.4.a 5.4.b 5.4.c 5.4. http://www1.iwate-ed.jp/ JIS Web Web JIS JIS 5.1.a 5.1.b 5.2.a 5.2.b 5.2.c 5.2.d 5.2.e 5.2.f 5.2.g 5.3.a 5.3.b 5.3.c 5.3.d 5.3.e 5.3.f 5.3.g 5.3.h 5.3.i 5.4.a 5.4.b 5.4.c 5.4.d 5.4.e 5.5.a 5.5.b 5.5.c

More information

Microsoft PowerPoint - kougi9.ppt

Microsoft PowerPoint - kougi9.ppt C プログラミング演習 第 9 回ポインタとリンクドリストデータ構造 1 今まで説明してきた変数 #include "stdafx.h" #include int _tmain(int argc, _TCHAR* argv[]) { double x; double y; char buf[256]; int i; double start_x; double step_x; FILE*

More information

54 5 PHP Web hellow.php 1:<?php 2: echo "Hellow, PHP!Y=n"; 3:?> echo PHP C 2: printf("hellow, PHP!Y=n"); PHP (php) $ php hellow.php Hellow, PHP! 5.1.2

54 5 PHP Web hellow.php 1:<?php 2: echo Hellow, PHP!Y=n; 3:?> echo PHP C 2: printf(hellow, PHP!Y=n); PHP (php) $ php hellow.php Hellow, PHP! 5.1.2 53 5 PHP Web Web 1 Web OS (Web) HTML Web Web Web 5.1 PHP Web PHP ( ) 5.1.1 hellow.php ( ) Hellow, PHP! PHP hellow.php PHP HTML PHP 54 5 PHP Web hellow.php 1:

More information

ネットワークプログラミング

ネットワークプログラミング ネットワークプログラミング 千代浩司 高エネルギー加速器研究機構 素粒子原子核研究所 1 内容 クライアントアプリケーションを書けるようになろう 情報のありか 各種ユーティリティー 2 Protocol 参考書 TCP/IP Illustrated, Volume 1 (Stevens) Programming Unix Network Programming Volume 1 (3rd edition)

More information

Minimum C Minimum C Minimum C BNF T okenseq W hite Any D

Minimum C Minimum C Minimum C BNF T okenseq W hite Any D 6 2019 5 14 6.1 Minimum C....................... 6 1 6.2....................................... 6 7 6.1 Minimum C Minimum C BNF T okenseq W hite Any Digit ::= 0 1 2... 9. Number ::= Digit Digit. Alphabet

More information

C ( ) C ( ) C C C C C 1 Fortran Character*72 name Integer age Real income 3 1 C mandata mandata ( ) name age income mandata ( ) mandat

C ( ) C ( ) C C C C C 1 Fortran Character*72 name Integer age Real income 3 1 C mandata mandata ( ) name age income mandata ( ) mandat C () 14 5 23 C () C C C C C 1 Fortran Character*72 name Integer age Real income 3 1 C 1.1 3 7 mandata mandata () name age income mandata () mandata1 1 #include struct mandata char name[51];

More information