| 名称 | ポート番号 | |
|---|---|---|
| plane | ssl/tls | |
| HTTP | 80 | 443 |
| FTP data | 20 | 989 |
| FTP | 21 | 990 |
| Telnet | 23 | 992 |
| IMAP | 143 | 993 |
| IRC | 194 | 994 |
| SMTP | 25 | 465 |
| POP3 | 110 | 995 |
| NNTP | 119 | 563 |
| LDAP | 389 | 636 |
2005年3月アーカイブ
前回は、修行が足りなかったみたい。
union なんて必要ありません。
メモリ上のデータの並びがわかります。
Intel だったらリトルエンディアン
#include
#include
typedef unsigned char BYTE;
using namespace std;
int main()
{
double d;
d = 1.0;
BYTE *b = reinterpret_cast
// ビッグエンディアン
for (int i = 0; i < sizeof(double); ++i)
cout << setw(2) << setfill('0') << hex << static_cast
cout << endl;
// リトルエンディアン
for (int i = sizeof(double); i != 0; --i)
cout << setw(2) << setfill('0') << hex << static_cast
cout << endl;
return 0;
}