Sangjun 개발 블로그
    • 카테고리
    • Algorithm
    • apple
    • AWS
    • boto3
    • cron
    • crontab
    • DB
    • Django
    • Docker
    • facebook
    • fcm
    • Go
    • google
    • Gopacket
    • Gui
    • Guide
    • kakao
    • Learning
    • LeetCode
    • Linux
    • logging
    • mariaDB
    • Models
    • MSSQL
    • naver
    • NFS
    • Numpy
    • oauth
    • Opencv
    • PostgreDB
    • pytest
    • Python
    • Sniff
    • Swagger
    • Windows
    • Windows10
    • WSL
    Hero Image
    golang gopacket 라이브러리를 이용한 통신

    gopacket : 이더넷 어댑터 설명(dev.Description)명칭으로 ethernet 통신하는 라이브러리이다. 예제 코드 package main import ( "fmt" "log" "net" "strings" "time" "github.com/google/gopacket" "github.com/google/gopacket/layers" "github.com/google/gopacket/pcap" ) var ( device string = "Realtek PCIe GbE Family Controller" eth_name string currentIP string snapshot_len int32 = 1522 promiscuous bool = false err error timeout time.Duration = 30 * time.Second handle *pcap.Handle buffer gopacket.SerializeBuffer options gopacket.SerializeOptions ) func main() { devices, err := pcap.FindAllDevs() if err !

    July 29, 2021 Read
    바로가기
    • About
    • Recent Posts
    Contact me:
    • sangjuncha.dev@gmail.com

    Toha Theme Logo Toha
    Copyright 2020. SangjunCha all rights reserved.
    Powered by Hugo Logo