Skip to content

Commit 09bc011

Browse files
committed
no commit message given
1 parent 277ae7a commit 09bc011

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* This file is part of the demos-os-linux package.
3+
* Copyright (C) 2011-2025 Mark Veltzer <[email protected]>
4+
*
5+
* demos-os-linux is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* demos-os-linux is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with demos-os-linux. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
#include <firstinclude.h>
20+
#include <err_utils.h> // for CHECK_NOT_M1()
21+
#include <sys/socket.h> // for socket(2)
22+
#include <arpa/inet.h>
23+
#include <stdio.h>
24+
25+
/*
26+
* This is a tcp client demo.
27+
*/
28+
29+
int main() {
30+
int fd=CHECK_NOT_M1(socket(AF_PACKET, SOCK_RAW, htons(0x88B5)));
31+
printf("fd is %d\n", fd);
32+
return EXIT_SUCCESS;
33+
}

0 commit comments

Comments
 (0)