Programming > QUESTIONS & ANSWERS > University Of Arizona CYBV CYBV 480 Write a Python program named extractFrame.py . In the program (All)
University Of Arizona CYBV CYBV 480 Write a Python program named extractFrame.py . In the program, you...Question Answered step-by-step Write a Python program named extractFrame.py . In the pr... ogram, you... Write a Python program named extractFrame.py. In the program, you need to approach the below tasks. Below all this is the wireShark.txt file below the Script which I have labeled. Task 1: Create Frame Class The first task is to define a Frame class. From the class, you can create Frame objects. In the skeleton code provided below, the class contains some methods you need to define in the class. In [13]: class Frame: """ A Frame is use to represent a data frame described in the given file. Attributes: id: int, frame number id such as 1 of frame 1 in the given file src: str, source address such as "00:14:ee:08:dd:b1" of frame 1 dec: str, destination address such as "01:00:5e:7f:ff:fa" of frame 1 ftype: str, frame type such as "0x800" that describes the IPv4 protocol of frame 1 Methods: __init__ __str__ setAddress: set either src or dec setFrameType: set ftype value """ def __init__(self, n, src="", dst="", ftype=""): """ n: an int set as the id of the Frame object src: a str set as the source address dst: a str set as the destination address ftype: a str set as the fame type """ pass def setAddress(self, address, isSrc): """ address: a string to set as src or dst address isSrc: a bool, if it is True, set src as address and otherwise set dst as address """ pass def setFrameType(self, ftype): """ ftype: a string to set as ftype value [Show More]
Last updated: 2 years ago
Preview 1 out of 11 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Aug 19, 2022
Number of pages
11
Written in
This document has been written for:
Uploaded
Aug 19, 2022
Downloads
0
Views
139
In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·