Skip to content

Commit 75aec14

Browse files
committed
added other experiments
1 parent 9e481ad commit 75aec14

File tree

7 files changed

+43
-22
lines changed

7 files changed

+43
-22
lines changed
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1+
2+
/**
3+
* This code has some error. Please wait for debugged code.
4+
*/
15
#include <sys/types.h>
26
#include <sys/socket.h>
37
#include <net/if_arp.h>
48
#include <sys/ioctl.h>
59
#include <stdio.h>
10+
#include <string.h>
11+
#include <stdlib.h>
612
#include <unistd.h>
713
#include <netinet/in.h>
814
#include <arpa/inet.h>
@@ -30,4 +36,4 @@ int main(int argc, char *argv[])
3036
printf("MAC Address For '%s' : ", argv[1]);
3137
printf("%X:%X:%X:%X:%X:%X\n", *ptr, *(ptr + 1), *(ptr + 2), *(ptr + 3), *(ptr + 4), *(ptr + 5), *(ptr + 5));
3238
return 0;
33-
}
39+
}

10-arp-implementation-udp/server.c

Whitespace-only changes.

8-file-transfer-protocol/server.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ Thanks.
2525
#define PORT 9002
2626
#define BACKLOG 5
2727
int main()
28-
{ int size;
28+
{
29+
int size;
2930
int socket_descriptor = socket(AF_INET, SOCK_STREAM, 0);
3031
struct sockaddr_in server_address, client_address;
3132
socklen_t client_length;
-8.96 KB
Binary file not shown.

9- remote-command-execution-udp/client.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/*
2+
* Title : Remote command execution using UDP
3+
* Name : Aditya Pratap Singh Rajput
4+
* Subject : Network Protocols And Programming
5+
6+
Note : please consider the TYPOS in comments.
7+
Thanks.
8+
*/
9+
110
#include <sys/types.h>
211
#include <sys/socket.h>
312
#include <stdio.h>

9- remote-command-execution-udp/server.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/*
2+
* Title : Remote command execution using UDP
3+
* Name : Aditya Pratap Singh Rajput
4+
* Subject : Network Protocols And Programming
5+
6+
Note : please consider the TYPOS in comments.
7+
Thanks.
8+
*/
19
#include <sys/types.h>
210
#include <sys/socket.h>
311
#include <stdio.h>

LICENSE

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
This is free and unencumbered software released into the public domain.
1+
MIT License
22

3-
Anyone is free to copy, modify, publish, use, compile, sell, or
4-
distribute this software, either in source code form or as a compiled
5-
binary, for any purpose, commercial or non-commercial, and by any
6-
means.
3+
Copyright (c) 2018 Aditya Pratap Singh Rajput
74

8-
In jurisdictions that recognize copyright laws, the author or authors
9-
of this software dedicate any and all copyright interest in the
10-
software to the public domain. We make this dedication for the benefit
11-
of the public at large and to the detriment of our heirs and
12-
successors. We intend this dedication to be an overt act of
13-
relinquishment in perpetuity of all present and future rights to this
14-
software under copyright law.
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
1511

16-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19-
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20-
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22-
OTHER DEALINGS IN THE SOFTWARE.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
2314

24-
For more information, please refer to <http://unlicense.org>
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)