Lan Tian @ Blog

I'm starting to provide Chinese / English versions of some articles, switch with the Language menu above. 我开始提供部分文章的中文、英文翻译,请使用顶部语言菜单切换。

An Elegant "Scripture of Safety" Generator

This article is about a meme in China that may require some cultural background to understand. Since the content is related to the specific language used, there are minor differences between the Chinese and English versions. What's "Scripture of Safety"?¶ The Scripture of Safety (平安经) is a book written by He Dian, the (now former) official of Jilin Public Security Department, China....

Configure BGP Confederation & Fake Confederation in Bird (Updated 2020-06-07)

Changelog¶ 2020-06-07: Add limitations of Bird confederation, and a way to simulate confederation 2020-05-17: Initial version Comparison of BGP Interconnection Schemes within an ISP¶ Most ISPs, or Internet Service Providers, use BGP protocol to exchange their route information. Each ISP will obtain an ASN (Autonomous System Number) from the regional NIC (Network Information Center, e.g. APNIC,...

x32 ABI and Docker Containers

History of x86 & x86_64, and x32 ABI¶ Most of the personal computers and servers we use nowadays use the x86_64 architecture, whose specification was released by AMD in 2000, and the first processor released in 2003. Since x86_64 is a 64-bit architecture, in x86_64 each register in the CPU can hold 64 bits of data (or 8 bytes). Before x86_64 went popular,...

Writing a Simple Telegram Bot

Based on the requests of DN42 Telegram Group members, I plan to add Telegram Bot support to my Bird Looking Glass, so it is easier for them to look up whois information, testing networks and finding sources of route leaks. The bot is supposed to recognize commands starting with /, and respond to the message. My Looking Glass is written in Go,...

Cyclone IV FPGA Development Log

Last semester, the school offered a digital systems course, which involves development on FPGAs. At the end of the course, we need to gather in groups and achieve some complicated functionality with the flexible architecture of FPGA, such as creating a game or running a convoluted neural network. We are free to add extra functionalities as we wish. Our group has done a game similar to Raiden,...

Bird-lg in Go (Bird Looking Glass)

What's BIRD? And What's Bird-lg?¶ BIRD is a popular BGP routing software used on Linux. I mainly use Bird in the DN42 network, to establish connections with other users. Bird-lg is a Python 2 based program developed by GitHub user sileht. It provides a web interface to show status of BIRD routing software on each server, and query routes to specified IPs....

RoboMaster Development Log (Updated 2018-05-28)

Our school organized a RoboMaster team and plans to attend the competition this year. Since we are all new students at a new campus, we do not have any reference materials available from previous students, and we have to figure out bugs after bugs on our own. This article describes some of the problems we met during software development. Hardware: RoboMaster Official Development Board MCU Model:...

Support WebP on IE and Firefox

I wrote a PHP snippet to fetch high resolution images from the website of Himawari 8 Satellite, and combine them into one high resolution image. The way to fetch satellite images is available here. However... The combined 4d resolution PNG image (2200x2200) is over 7 MB in size, and due to the bad connectivity between China and the US, it takes over a minute to load the image (from my server)....