Programming
In the last article, I wrote a program to return ICMP Echo Replies using XDP.
I implemented a program that returns ICMP Echo Replies, but it turned out that the ICMP checksum was not calculated correctly.
Quick Try at an Introduction to XDP Part 3 (ICMP Echo Reply Section 1) This time, I would like to describe how to correctly calculate and return the ICMP checksum.
Please praise me for writing for two consecutive days without being lazy.
…
In the previous article, we used eBPF Map in XDP to exchange data with user space.
Quick Start Guide to XDP: Part 2 (eBPF Map Edition) In the article before that, we wrote a program using XDP that drops all packets.
Quick Start Guide to XDP: Part 1 This time, we will write a program that responds with ICMP Echo Reply to ICMP Echo Request.
How to Respond with ICMP Echo Reply To respond with ICMP Echo Reply to an ICMP Echo Request, the following steps are necessary:
…
Overview In the previous article, I wrote a program using XDP to DROP all packets.
Quick Start Guide to XDP This time, I’ll write a program that counts the number of packets that were DROPPED using eBPF Maps.
Again, this discussion is for those looking to quickly get hands-on with XDP + eBPF Maps.
Therefore, detailed explanations of eBPF and types of Maps not being used will be omitted.
Environment Setup This guide assumes an Ubuntu 22.
…
What Did I Do? I had previously introduced OpenDKIM in my notes when Notes on Adding OpenDKIM to Postfix + DMAR, but I wanted to support ARC signatures as well, so I switched to arcmilter.
arcmilter is a milter designed for performing ARC signatures, but it can also handle DKIM signatures.
arcmilter is written in Go.
I should clarify, I wrote it myself… right?
You can find arcmilter in the following repository:
…
Overview This is a quick guide to get started with XDP.
Detailed explanations of eBPF and other concepts are omitted.
XDP is a framework for processing packets at the earliest stage of the Linux kernel’s networking stack, allowing programs to be directly inserted into the NIC (Network Interface Card) using eBPF.
Since XDP operates on packets at the earliest stage of the Linux kernel’s networking stack, it can process them faster than filters like iptables.
…
When debugging a program built with gcc using GDB on FreeBSD, you might encounter errors if the debug information format is different. Here are some notes on the issue.
Doesn’t Work When debugging a program built with gcc on FreeBSD’s GDB, you may see an error stating that there is no symbol information.
# gcc -g test.c # gdb a.out Works By setting the debug information to use the DWARF-2 format, symbol information will be displayed in gdb.
…
This content has been moved from Qiita.
To specify date formatting in Golang, you use the time.Format function. I needed to format dates for graphite-api using the following format:
However, I encountered issues where it worked on some environments but not on others, wasting a lot of time. The problem turned out to be a bug that was fixed in a Golang version update.
Specifying the Format Specified format: HH:SS_YYYYMMDD So in Golang: Format("15:04_20060102") Test Code package main import ( "fmt" "time" ) func main() { now := time.
…
This content has been moved from Qiita.
When coding in Go using Vim, you can make coding easier with syntax highlighting and tools like gofmt and goimports. However, I found various articles on this topic to be complex, so I decided to compile my own simplified guide.
Installing Golang OS X $ brew install golang CentOS $ sudo yum install golang --enablerepo=epel Ubuntu $ sudo apt install golang Creating a Directory for GOPATH $ mkdir $HOME/go Setting Environment Variables in .
…