Sangjun 개발 블로그
    • 태그
    • algorithm
    • apple
    • aws
    • boto3
    • cron
    • crontab
    • db
    • django
    • docker
    • facebook
    • fcm
    • go
    • google
    • gopacket
    • gui
    • kakao
    • learning
    • leetcode
    • library
    • linux
    • logging
    • mariadb
    • models
    • mssql
    • naver
    • nfs
    • numpy
    • oauth
    • opencv
    • postgredb
    • pytest
    • python
    • sniff
    • sql
    • 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