-
Notifications
You must be signed in to change notification settings - Fork 134
/
pkt_dump.c
53 lines (48 loc) · 1.8 KB
/
pkt_dump.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* =====================================================================================
*
* Filename: pkt_dump.c
*
* Description: This file implements the routine to dump packet content field by field
*
* Version: 1.0
* Created: 11/03/2019 01:51:00 AM
* Revision: none
* Compiler: gcc
*
* Author: Er. Abhishek Sagar, Juniper Networks (www.csepracticals.com), [email protected]
* Company: Juniper Networks
*
* This file is part of the NetworkGraph distribution (https://github.com/sachinites)
* Copyright (c) 2019 Abhishek Sagar.
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General
* Public License as published by the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* visit website : www.csepracticals.com for more courses and projects
*
* =====================================================================================
*/
#include "Layer2/layer2.h"
#include "tcpconst.h"
#include <stdio.h>
/* Implement below function to print all necessary headers
* of the packet including :
* Ethernet Hdr
* ARP hdr
* IP Hdr
* For Unknown payload type (application data) , just
* print the offset and size of payload in the frame.
*
* We shall be using below API to verify our code changes
* are correct or not for catching early bugs !!
* */
void
pkt_dump(ethernet_hdr_t *ethernet_hdr,
unsigned int pkt_size){
/*Assignment*/
}