Similar documents

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


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

slice00_install.dvi


InterSafe Personal_v2.3 ユーザーズガイド_初版

dvi

PowerPoint プレゼンテーション

20 H8/3069LAN H. Fukura

MINI2440マニュアル

MathLibre KNOPPIX (next generation) 2012 KNOPPIX/Math MathLibre KNOPPIX , KNOPPIX 6.0, next generation. KNOPPIX/Math KDE,

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

untitled

# mv httpd tar.gz /usr/local/src /usr/local/src # tar zxvf httpd tar.gz make #./configure # make # make install Apache # /usr/local/apac


Windows XP Windows Me Windows 98 Second Edition Windows /... 25

INR-HG5579a_Netshut_Guide_Linux-Solaris_.doc

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

INSメイトV30Slim取扱説明書(5版2008.3)

2004 SYN/ACK SYN Flood G01P014-6

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

GENESYS2005_Instal_Guide.PDF

untitled

untitled

Oracle Application Server 10g( )インストール手順書

5 ISMS 5 4 PC PC USB PDA 2

untitled

FileMaker Server 9 Getting Started Guide

3 Ubuntu Linux Ubuntu Linux Debian Linux DistroWatch.com 1 Debian Ubuntu Linux 1 Debian CD(4.1 ) Knoppix Debian CentOS Linux CentOS 1 Ubuntu L

(1)

3.2 Linux root vi(vim) vi emacs emacs 4 Linux Kernel Linux Git 4.1 Git Git Linux Linux Linus Fedora root yum install global(debian Ubuntu apt-get inst

Java updated

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

. UNIX, Linux, KNOPPIX. C,.,., ( 1 ) p. 2

MINI2440マニュアル

LDR-MA16FU2_WM.n.[.h.E.F.A.}.j...A.._Win.p65

MSAC-US40

H H H H H H H H Windows IC USB WindowsXP+FZ1360 WindowsXP+FZ1350 J2SE Runtime Environment 5.0 Window

Andor

konicaminolta.co.jp PageScope Net Care

Ubuntu Linux PC Ubuntu Linux (14.04 LTS, Trusty Tahr) 32bit CD 64bit CD 2. 32bit CPU 64bit 32bit PC CPU 32bit 64bit Windows 64bit 64bit. 32bit Core 64

intra-mart Web for SellSide ver /03/31 Oracle MS-SQL Server IBM DB2 MS-SQL Server IBM DB2 Client Side JavaScript Server Side JavaScript URL -

目次 1. HLA Fusion 3.0 がインストール可能な環境 HLA Fusion 3.0 のインストール HLA Fusion 3.4 のインストール 初期設定用データベース接続 ( 初めての方のみ ) 既存データベースのUpg

Installation and New Features Guide for FileMaker Pro 10 and FileMaker Pro 10 Advanced

KNOB Knoppix for Bio Itoshi NIKAIDO

FileMaker, Inc. All Rights Reserved. FileMaker, Inc Patrick Henry Drive Santa Clara, California FileMaker FileMaker, Inc. FileMa

できるん?! セキュリティ ~ハードディスクの情報消去~

Corel GuideMenu DVD MovieWriter SE DVD MovieWriter SE DVD MovieWriter SE WinDVD SE WinDVD SE Corel Application Disc Corel Application Disc 2

VNSTProductDes3.0-1_jp.pdf

できるん?! セキュリティ 〜ハードディスクの情報消去〜 改訂第三版

名称未設定

DCR-SR100

DianaScope インストレーションマニュアル

BIND 9 BIND 9 IPv6 BIND 9 view lwres

LP-S820

EPSON Offirio SynergyWare PrintDirector 取扱説明書 導入ガイド

Alfresco設置手順書

Running FileMaker Pro 8 on Windows Server 2003 Terminal Services

08+11Extra

Oracle Application Server 10g(9

2/14 ) USB ( ( ) [ ( )] ) ( 3.

debian_manual.dvi

抗菌薬の再評価結果及び効能・効果読替えに関するご案内

FileMaker Mobile 8 User’s Guide

FileMaker Server 9 Getting Started Guide

オンラインによる 「電子申告・納税等開始(変更等)届出書」 提出方法


Microsoft Word - マニュアル4.1J

rzat10pdf.ps

OpenCV Windows(cygwin) Linux USB PC [1] Inel OpenCV OpenCV 1 Windows Linux OpenCV (a) (b)2 (c) (d) 1: OpenCV 1

untitled

Printer Driverセットアップ編

Windows2000 Edge Components V Edge Components V Java Edge Components

Add-onアプリケーション開発 - 環境構築マニュアル -

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

ASTERIA WARPインストールガイド

FreeBSD 1

VQS Collabo Homepage

DVD...j.b.g.n.[.h.E.F.A.}.j...A...p65

PostgreSQLによる データベースサーバ構築技法

<%DOC NAME%> (User Manual)


ファーストステップガイド1.2.doc

DVD CD SoundRipper SoundRipper DVD SoundRipper DVD SoundRipper DVD CD DVD DVD DVD CD CD DVD " CD/DVD" DVD CSS DVD SoundRipper DVD-Video DVD DVD-ROM DV

Using a Remote Desktop Connection with FileMaker Pro

untitled

CMS入門

yacc.dvi

USB 起動 KNOPPIX / Math / 2010 について (数式処理研究の新たな発展)

untitled

wide90.dvi

Logitec NAS シリーズ ソフトウェアマニュアル


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

G700 Camera User Guide

E2 Spider 2018/08/03 Intel NUC Core i7 PC 2.5 /M.2 SSD BOXNUC7I7BNH PC DDR4-2133(PC ) 8GBX2 260pin 1.2V CL15 SP016GBSFU213B22 WD SSD M /51

untitled

LP-M720F

houkokushort.dvi

Transcription:

1 UEC UEC http://www.tnlab.ice.uec.ac.jp/daihinmin/ 20061028

1 4 2 6 2.1.......................... 6 2.1.1.............................. 6 2.1.2......................... 6 2.1.3........................... 7 2.1.4..................... 7 2.1.5..................... 8 2.2............................ 8 2.2.1.............................. 8 2.2.2....... 8 3 10 3.1 1......................... 10 3.1.1......... 11 3.1.2............... 11 3.1.3.......................... 12 3.1.4............... 12 3.2 2................. 12 4 UEC 13 4.1............................. 13 4.1.1.......................... 13 4.1.2........................ 13 4.1.3.......................... 13 4.2............................. 14 4.2.1............................... 14 4.2.2.......................... 14 4.2.3.......................... 14 4.2.4........................... 14 4.2.5............................. 15 1

4.2.6 ( )..................... 15 4.2.7 ( )........................... 15 4.2.8............................... 15 4.2.9............................... 16 4.3.................... 16 4.3.1........................... 16 4.3.2 3.......................... 17 4.3.3 8 ( )................. 17 4.4.............................. 17 4.4.1 8.............................. 17 4.4.2.............................. 18 4.5......................... 18 4.5.1 ( )................... 18 4.5.2.............................. 18 4.6......................... 19 5 20 5.1................................. 20 5.2 Cygwin Windows........... 21 5.2.1 Cygwin.................... 21 5.2.2.......... 22 5.3 knoppix........................... 25 5.3.1...................... 25 5.3.2......................... 25 6 30 6.1............................... 30 6.1.1 cygwin.......................... 30 6.1.2 knoppix......................... 30 6.2................... 32 6.2.1 Cygwin....................... 32 6.2.2 knoppix....................... 33 6.3............... 33 6.4.............. 33 6.4.1 (Cygwin )...................... 34 6.4.2 (knoppix )..................... 34 6.4.3......................... 35 6.5.......................... 36 6.5.1 Cygwin......................... 36 2

6.5.2 knoppix......................... 36 6.6..................... 37 7 38 7.1................................... 38 7.2.............................. 38 7.3................................. 39 7.3.1.......................... 39 7.3.2......................... 40 7.3.3...................... 43 7.4................................. 43 7.4.1........................... 43 7.4.2............................... 44 7.5?...................... 45 8 46 8.1..................... 46 8.2............................ 47 8.3................................. 47 9 49 9.1.............................. 49 9.2............................ 50 9.3.............................. 51 9.3.1 scope type........................... 51 9.3.2 state type............................ 51 9.4................................. 52 9.4.1 daihinmin.c........................... 52 9.4.2 connection.c........................... 54 9.5.................................. 55 10 57 10.1 F AQ........................... 57 10.1.1..................... 57 10.1.2...................... 58 10.2.............................. 59 11 61 3

1 1960 5 2 5 5 6 11 18 UEC 4

UEC 1 UEC 11 18 UEC! 5

2 1 UEC 2.1 100 2.1.1 2.1.2 1. 5 (5 ) 2. 1 ( 2.3 ) 3. 100 6

4. 5. 5 1 100 2.1.3 100 1 100 30 2.1.4 1 1 5 2 4 3 3 4 2 5 1 100 500 100 7

2.1.5 1 2 100 5 5 100 2.2 2.2.1 2.2.2 Web 8

5 1 1. 5 2. 1 ( 2.3 ) 3. 4. 1 2 5. 9

3 UEC 1. 2. 3.1 1 1. knoppix CD Linux ( ) 2. Windows cygwin 3. FreeBSD,Solaris,Linux 1. 2,3 1. Windows cygwin(http://www.cygwin.com) (2. ) 2. (http://www.tnlab.ice.uec.ac.jp/daihinmin/) 3. (.tar.gz ) 4. 10

5. 2 1 1 3.1.1 UEC Web (http://www.tnlab.ice.uec.ac.jp/daihinmin/) ( ) ( 8 ) ( ) 3.1.2 Web (8, ) 11

3.1.3 6 3.1.4 ( ) UEC 11 12 daihinmin@ice.uec.ac.jp 3.2 2 UEC ( ) 2 UEC 1 12

4 UEC 1 UEC 1 UEC UEC 2006 UEC 2006 4.1 4.1.1 52 1 53 4.1.2 2 4.1.3 3 2 ( ) 3 13

4.2 3 3 4.2.1 ( ) 4.2.2 3 3 4.2.3 3 4 5 1 4.2.4 14

4.2.5 2 8 3 4.2.6 ( ) 4.2.7 ( ) 3 9 10 5-6-7 8-9-10 ( ) 4.2.8 3 2 4 3 15

4 5 4.2.9 1 2 2 1 3 4 1 5 2 1. 2. 3. 4. 4.3 4.3.1 2 3 9 2 9 3 16

( ) ( ) ( ) 9 ( 3 ) 4.3.2 3 3 3 1 ( ) 3 3 3 3 3 4.3.3 8 ( ) 8 8 8 8 8 4.4 4.4.1 8 8 8 ( ) 8 8 8 8 17

4.4.2 4 6 7 7 9 9 2 9 9 4.5 4.5.1 ( ) 1. 2. 20 4.5.2 ( ) 18

2.8Ghz Pentium4 UltraSparcIII Cu Solaris8 4.6 daihinmin@ice.uec.ac.jp 19

5 C Java C 5.1 Solaris FreeBSD Linux OS Cygwin Windows Windows Cygwin Cygwin Windows Linux Linux Cygwin Linux knoppix knoppix 1CD Linux Linux CD-ROM DVD knoppix knoppix CD DVD DVD DVD daihinmin@ice.uec.ac.jp CD Cygwin knoppix 20

5.2 Cygwin Windows Cygwin Windows 5.2.1 Cygwin Cygwin Cygwin Cygwin http://www.cygwin.com/ 5.1 Install or update now! 5.1: Cygwin (http://www.cygwin.com/) 5.2 5.3 URL.jp 21

?? Install Cygwin Devel X11 5.4! 5.2.2 UEC Web ( http://www.tnlab.ice.uec.ac.jp/daihinmin/ ) 5.6.tar.gz Windows.tar.gz LhaForge Lhaplus daihinmin (C:) cygwin home home Administrator 5.7 6 22

5.2: 5.3: 5.4: 5.5: 23

5.6: 5.7: daihinmin 24

5.3 knoppix 5.3.1 1. DVD-R 1 (100 ) 2. 64MB USB (2000 ) 3. ( PC ) 4. ( ) knoppix 5.3.2 DVD-R 1 USB? OK! knoppix knoppix (Internet Exproler Firefox ) http://unit.aist.go.jp/itri/knoppix/ ( 5.8 ) ( CD )CD[iso ] ( 5.9 ) (?? ) knoppix v5.0.1dvd( ).iso knoppix ( 5.11 ) DVD-R knoppix ( 5.12 ) 25

5.8: knoppix 5.9: CD[iso ] 26

5.10: 5.11: 27

UEC (http://www.tnlab.ice.uec.ac.jp/daihinmin/) USB knoppix DVD PC PC knoppix DVD DVD DVD PC DVD DVD PC knoppix knoppix USB PC 6 28

5.12: DVD 29

6 6.1 cygwin knoppix 6.1.1 cygwin cygwin terapad 6.1.2 knoppix knoppix USB 30

USB knoppix DVD USB 5 USB 6.1 6.1: OK ( 6.2 ) 6.2: USB USB KDE knoppix USB USB /media/sda1 tar xvzf 31

( 20061018 20061020 20061018 20061020 ) $cd /media/sda1 $tar xzvf tndhm_devkit20061018.tar.gz $ daihinmin 6.2 6.2.1 Cygwin 5 daihinmin client client.c ( ) ( 6.2.1) 6.3: client.c client 9 32

6.2.2 knoppix {USB }/daihinmin/client/ ( ) emacs $cd /media/sda1/daihinmin/client $emacs client.c & $ emacs emacs web emacs 6.3 README.txt client ( ) $./configure $make clean $make 6.4 knoppix knoppix CD DVD DVD DVD 33

daihinmin@ice.uec.ac.jp CD Cygwin knoppix 6.4.1 (Cygwin ) Cygwin 6.4.1 6.4: $cd ~/daihinmin/server $./configure $cd src $make clean $make 6.4.2 (knoppix ) OK 34

$cd /media/sda1/daihinmin/server $./configure $make clean $make $ daihinmin@ice.uec.ac.jp $./configure $make clean $make INSTALL.txt 6.4.3 Cygwin cygwin.exe $startxwin.sh 6.5 6.5: 35

$cd ~/daihinmin/server/src $./tndhms.exe & 8 knoppix $cd /media/sda1/daihinmin/server/src $./tndhms & 8 6.5 6.5.1 Cygwin $cd ~/daihinmin/client $./client.exe 127.0.0.1 & 5 2 5 5 6.5.2 knoppix $cd /media/sda1/daihinmin/client $./client 127.0.0.1 & 36

5 5 5 6.6 9 7 37

7 7.1 socket 7.2 8x15 ( ) UEC 7.1 7.1: 1 1 JOKER 2 Yes or No 1 Yes 0 No 38

7.3 7.3.1?? socket 7.2: 39

1 2 3 ( ) 4 5 6 5 7 8 7.3.2 7.2 1 2 [5][1] 1 2 3 8 1 7 8 4 5 6 C table 1; while( ){ 2; 40

} if(table[5][1]>0){ 3; } while( 8 1 ){ if( ){ 4; 5; 6; } 7; 8; } daihinmin@ice.uec.ac.jp 1: socket 0 4! 2: [5][1] 3: 2 41

4: 4 7 4 7 [5][2] 1 4 5: 4 1 0 2 0 6: 5 5 9 8 8 7: 42

1 0 (5 ) 4 8: 1 5 4 7.3.3 0 4 7.4 7.4.1 2 43

? [4][1] 2 [4][1] 2!!? [0][0] [3][14] 2 0? 2 OK 9 10 9 10 11 [0][7] [0][8] 1 [0][9] 2 0 5 5 4 [0][3] [1][3] [2][3] 1 [3][3] 2 0 OK daihinmin@ice.uec.ac.jp 7.4.2 0 ( ) 44

0 7.5? OK 45

8 8.1 5 1 1. 2. 2 3. 2 4. 1 5. 1 46

6. 4 (a) (b) (c) (d) (e) (f) (g) (h) (i) 7. 1 8.2 configure xmkmf INSTALL.txt 8.3 src tndfgs 8.1 1. 2. 3. 4. 5. 6. 47

7. 1 8.1: 48

9 9.1 client.c daihinmin.c daihinmin.h connection.c connection.h selection.c client.c change.c client.c client.c client.c 1. (entrytogame()) 2. (starttrick()) 3. 1 2 (change.c) 4. (receivecards()) 49

5. (selection.c) 6. (sendcards()) 7. 4 8. 2 9. (closesocket) 9.2 int g logging struct state type state client.c main int my playernum; int whole gameend flag=0; int one gameend flag=0; int accept flag; int own cards buf[8][15]; int own cards[8][15]; int ba cards buf[8][15]; int ba cards[8][15]; int table count=0; int game count=0; int new game flag=1; char server name[16]; daihinmin static int order[15] connection static int g sockfd static int g writer len static int g new sockfd static int g buf len static struct sockaddr in g reader addr static struct sockaddr in g writer addr static struct sockaddr in g client addr 1 IP daihinmin.c connection.c 50

9.3 daihinmin.h 2 9.3.1 scope type scope type struct scope_type { int loword; int highord; int maxqty; int minqty; int sequence; }; 1 0 9.3.2 state type state type struct state_type { int ord; int sequence; 1 0 int qty; int rev; 1 0 int b11; 11 1 0 int lock; 1 0 int onset; 1 0 int suit[5]; suit[i] 1 i int joker; Joker 1 0 }; 51

9.4 9.4.1 daihinmin.c struct scope type setscope(int low,int high,int min,int max,int sequence) scope type struct scope type defaultscope() scope type void getstate(int cards[8][15]) cards state type state void getfield(int cards[8][15]) cards state type state void showstate(void) state void showscope(struct scope type scope) scope struct scope type setscope(int low,int high,int min,int max,int sequence) scope type struct scope type defaultscope() scope type void setscopeloword(struct scope type* scope,int val) scope type loword void setscopehighord(struct scope type* scope,int val) scope type highord void setscopeminqty(struct scope type* scope,int val) scope type minqty void setscopemaxqty(struct scope type* scope,int val) scope type maxqty 52

void setscopesequence(struct scope type* scope,int val) scope type sequence void cardssieve(int cards[8][15],struct scope type scope) scope cards void cardssievetuple(int cards[8][15],struct scope type scp) cardssieve void cardssievesequence(int cards[8][15],struct scope type scp) cardssieve void setorder(int,int,int,int,int,int,int,int,int,int,int,int,int,int,int) (selectcards ) order[] selectcards void setorderdefault(void) order void selectcards(int cards[8][15]) cards order state cards cards state void cardsor(int cards1[8][15],int cards2[8][15]) cards2 cards1 void cardsand(int cards1[8][15],int cards2[8][15]) cards1 cards2 cards1 void cardsdiff(int cards1[8][15],int cards2[8][15]) cards1 cards2 void cardsnot(int cards[8][15]) cards cards void outputtable(int table[8][15]) void copytable(int org table[8][15],int dest table[8][15]) org table dest table 53

void copycards(int org cards[8][15],int dest cards[8][15]) org cards dest cards copytable void clearcards(int cards[8][15]) cards 0 int beemptycards(int cards[8][15]) cards 0 1 9.4.2 connection.c int entrytogame(char* host) host int starttrick(int table[8][15]) void sendchangingcards(int cards[8][15]) int receivecards(int cards[8][15]) 1 int sendcards(int cards[8][15]) void lookfield(int cards[8][15]) int begameend(void) 1 int refreshtable(int table val[8][15]) 0-1 54

int sendtable(int table val[8][15]) 0-1 int opensocket(char ip addr[], int portnum data) 0-1 int closesocket() close 0-1 9.5 cards1 1 1 1 1 1 1 cards1: 1 1 1 1 1 copycards(cards1,cards2); cards1 cards2 scope setscopeloword(scope,1); setscopehighord(scope,13); setscopeminqty(scope,3); setscopemaxqty(scope,10); setscopesequence(scope,1); 1 13 ( 3,4,,K,A,2) 3 10 cardssieve(cards2,scope); cards2 cards2: 1 1 1 1 1 1 cards1 cards2 cardsdiff(cards1,cards2); cards1 cards2 55

1 1 1 cards1: 1 1 selectcards(cards1); selectcards(cards2); order state cards1 cards2 56

10 FAQ 10.1 F AQ 10.1.1? 1 100 100 100? 10 57

10.1.2?? 4 ( ) 3 3 3? 3 3 OK? 58

4-5-6 7-8-9? 2 3? 3 3 3 3? 3 3 3 10.2 (knoppix) 59

Web daihinmin@ice.uec.ac.jp 24 60

11 UEC UEC 11 18 UEC 20061028 2006 10 28 2 4 3! 10 FAQ 20061021 2006 10 21 2 4 5 cygwin 6 cygwin 9 61

20061018 2006 10 18 3 4 6 knoppix DVD knoppix 7 JOKER 20061016 2006 10 16 11 20061015 2006 10 15 5 1 2 3 3.2 4 4.3.1 11 20061014 2006 10 14 3 62