-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
077bab9
commit 508a568
Showing
29 changed files
with
19,032 additions
and
3,865 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env python2.7 | ||
# send_dcp.py - Send a DCP packet | ||
# Copyright (c) 2012 Atomic Rules LLC - ALL Rights Reserved | ||
|
||
import optparse | ||
import os | ||
import re | ||
import subprocess | ||
import sys | ||
import time | ||
|
||
from scapy.all import * | ||
|
||
def main(argv): | ||
print """Hello from %s""" % (prog_name) | ||
p = Ether() | ||
p.src = '00:26:E1:01:01:00' # Linux Host Source MAC Address | ||
p.dst = '00:0A:35:42:01:00' # Xilinx FPGA Dest MAC Address | ||
p.type = 0xF040 # EtherType TCP | ||
#p.payload = "\x00\x0A\x00\x00\x0F\x05\x80\x00\x00\x01" # 10B NOP | ||
#p.payload = "\x00\x0E\x00\x00\x1F\x06\x00\x00\x00\x24\x00\x00\x00\x02" # 14B Write 0x24 with 0x00000002 | ||
#p.payload = "\x00\x0A\x00\x00\x2F\x07\x00\x00\x00\x24" # 10B Read 0x24 | ||
|
||
p.payload = "\x00\x0A\x00\x00\x2F\x07\x00\x00\x00\x50" # 10B Read | ||
print "Sending packet..." | ||
r = srp(p, iface="eth1") | ||
#print r | ||
#print 'r is a ' + str(type(r)) | ||
p.payload = "\x00\x0A\x00\x00\x2F\x07\x00\x00\x00\x54" # 10B Read | ||
print "Sending packet..." | ||
r = srp(p, iface="eth1") | ||
|
||
|
||
prog_name = os.path.basename(sys.argv[0]) | ||
if __name__ == '__main__': | ||
main(sys.argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.