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
.out | |
.o | |
.html |
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
LIBSLANKDEV := $(HOME)/git/libslankdev | |
CXXFLAGS += -I$(LIBSLANKDEV) -std=c++11 -I$(HOME) | |
LDFLAGS += -lboost_system | |
all: | |
$(CXX) $(CXXFLAGS) main.cc $(LDFLAGS) | |
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
#! /usr/bin/python | |
# | |
# BSD LICENSE | |
# | |
# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: |
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
#include <stdio.h> | |
#include <slankdev/extra/pcap.h> | |
#include <slankdev/hexdump.h> | |
void callback(uint8_t* user, const struct pcap_pkthdr* h, const uint8_t* byte) | |
{ | |
slankdev::hexdump(stdout, byte, h->len); | |
} | |
int main() |
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
#include <slankdev/socketfd.h> | |
#include <slankdev/hexdump.h> | |
const char* ifname = "lo"; | |
uint8_t packet[] = { | |
/* arp packet */ | |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
0x00, 0x00, 0x00, 0x00, 0x08, 0x06, 0x00, 0x01, | |
0x08, 0x00, 0x06, 0x04, 0x00, 0x01, 0x00, 0x00, |
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
/* | |
* 動作環境 | |
* CPU: Intel Core i5 6200 @2.30GHz | |
* RAM: 16GB | |
* | |
* 出力結果 | |
* ret: 1 | |
* int latency: 1840760982 | |
* jit latency: 113407004 |
NewerOlder