<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Grace Mihiral</title>
    <description>The latest articles on DEV Community by Grace Mihiral (@pendragon107).</description>
    <link>https://dev.to/pendragon107</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4195138%2Fcecd20bd-1ab1-4f7d-b06a-299484062fd7.jpg</url>
      <title>DEV Community: Grace Mihiral</title>
      <link>https://dev.to/pendragon107</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pendragon107"/>
    <language>en</language>
    <item>
      <title>Day 10: LLDP Packets</title>
      <dc:creator>Grace Mihiral</dc:creator>
      <pubDate>Mon, 16 Nov 2026 04:20:29 +0000</pubDate>
      <link>https://dev.to/pendragon107/day-10-lldp-packets-52d5</link>
      <guid>https://dev.to/pendragon107/day-10-lldp-packets-52d5</guid>
      <description>&lt;p&gt;Hi! Today I worked on defining a struct for LLDP packet information and mainly implemented a build and parsing method for the packets. I left off on implementing the switch thread that will actually recievie punted packets and broadcast LLDP packets out of each of its ports. &lt;/p&gt;

&lt;p&gt;Once that is done I'm going to start writing a test case or two for cases with multiple switches.&lt;/p&gt;

&lt;p&gt;Thanks for reading (I'll have a longer post once I finish the full LLDP control packet integration). :)&lt;/p&gt;

</description>
      <category>networking</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 9: Control Plane</title>
      <dc:creator>Grace Mihiral</dc:creator>
      <pubDate>Sun, 15 Nov 2026 03:23:03 +0000</pubDate>
      <link>https://dev.to/pendragon107/day-9-control-plane-d52</link>
      <guid>https://dev.to/pendragon107/day-9-control-plane-d52</guid>
      <description>&lt;p&gt;Hello all! Today I continued to work on the switch class which is pretty much the switches current control plane even though it doesn't have any real routing support right now.&lt;/p&gt;

&lt;p&gt;Today I wrote two show_ methods in the Switch class to show interfaces on the switch and vlan configurations of those interfaces. I then started working on eventually getting the switch to run a link state algorithm. &lt;/p&gt;

&lt;p&gt;I added a function for the dataplane packet processing threads to punt packets to the switch process. To do this I repurposed my ring_buffer class into a more generic thread safe ring buffer without logging to file capabilities that could take the packets and alert the switch that a packet has been punted up to be processed. My old logging class was remade into a new class called ringLogger, right now I don't see much purpose for it since I have the monitor class that works with Wireshark and is more fun to use but I'll probably find some use for the logging maybe for function calls in a debug mode. &lt;/p&gt;

&lt;p&gt;The next two milestones will probably be getting the switch to process the link state messages and respond accordingly. And writing some more python to make bringing multiple switches and a bigger topology up without having to do it manually.&lt;/p&gt;

&lt;p&gt;Anyways, thanks for reading :&amp;gt;&lt;/p&gt;

</description>
      <category>networking</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 8: Added a 'control plane'</title>
      <dc:creator>Grace Mihiral</dc:creator>
      <pubDate>Fri, 13 Nov 2026 04:51:45 +0000</pubDate>
      <link>https://dev.to/pendragon107/day-8-added-a-control-plane-mm2</link>
      <guid>https://dev.to/pendragon107/day-8-added-a-control-plane-mm2</guid>
      <description>&lt;p&gt;Hi, today I finished up the basics for the Switch class and added a Manager class that will probably stay untouched for now as I plan to spend more time adding features to the switch class. The aim is to get punting of packets working to then be able to implement a link state protocol since I think that could be cool. &lt;/p&gt;

&lt;p&gt;I believe I need to pass a threadsafe queue into the port threads I'm making to allow punting. Once I get that working though and set up a new test to spawn multiple switches I can work on implementing a protocol to detect switches going down and then later detecting the best path to forward packets through. The multiple switches experiments might wait till I have a Manager class working so I can maybe have an easier way to bring multiple switches up instead of having the tests run multiple switches manually and having to make a bunch of config files that share interfaces nicely. We'll see how time consuming that idea might be though, for a single topology making the config files manually wouldn't be too bad. &lt;/p&gt;

&lt;p&gt;Anyway thanks for reading :0 &lt;/p&gt;

</description>
      <category>networking</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 7: Splitting up planes</title>
      <dc:creator>Grace Mihiral</dc:creator>
      <pubDate>Thu, 12 Nov 2026 04:53:39 +0000</pubDate>
      <link>https://dev.to/pendragon107/day-7-splitting-up-planes-477d</link>
      <guid>https://dev.to/pendragon107/day-7-splitting-up-planes-477d</guid>
      <description>&lt;p&gt;Today I worked on trying to figure out how I wanted to split up my current main.cpp that was getting a bit overloaded with all the tasks it was doing. I moved the packet processing into my new dp.cpp/dp.h files and created a switch class that I aim to have manage all the information about a switch so all main.cpp has to do is just create the object and run the start() method. &lt;/p&gt;

&lt;p&gt;The current aim for making the split more formal and keeping them in separate files is mainly for readability right now since the functions in main.cpp were already quite separated and it was easy to pull things out. The other motivation was that I wanted to be able to change the switch configuration at runtime from user input kinda like a traditional CLI which I feel like will be easier with proper getter/setter functions that are a lot easier to organize in a class. &lt;/p&gt;

&lt;p&gt;I also got to use my test cases for the first time after splitting up the 'datapath' from the rest of main() when I was making sure I didn't introduce any new bugs and it felt really nice not having to manually run everything myself. Maybe testing is helpful...&lt;/p&gt;

&lt;p&gt;Anyway, thanks for reading :&amp;gt;&lt;/p&gt;

</description>
      <category>networking</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 6: Adding test cases for current features</title>
      <dc:creator>Grace Mihiral</dc:creator>
      <pubDate>Tue, 10 Nov 2026 04:20:38 +0000</pubDate>
      <link>https://dev.to/pendragon107/day-6-adding-test-cases-for-current-features-58f7</link>
      <guid>https://dev.to/pendragon107/day-6-adding-test-cases-for-current-features-58f7</guid>
      <description>&lt;p&gt;Hello. Today I worked on writing test cases for the features the switch currently has as well as separating the code from the Mininet bringup script into utils.py helpers to limit code duplication. I added tests for VLAN, MAC learning, interface checking, and making sure the monitor interface works. This was a lot of filler code so I'm at 1132 lloc.&lt;/p&gt;

&lt;p&gt;Thanks for reading :D.&lt;/p&gt;

</description>
      <category>buildinpublic</category>
      <category>python</category>
      <category>softwaredevelopment</category>
      <category>testing</category>
    </item>
    <item>
      <title>Day 5: Fixing VLAN bugs and adding a configuration file.</title>
      <dc:creator>Grace Mihiral</dc:creator>
      <pubDate>Sat, 07 Nov 2026 05:53:20 +0000</pubDate>
      <link>https://dev.to/pendragon107/day-5-fixing-vlan-bugs-and-adding-a-configuration-file-38gk</link>
      <guid>https://dev.to/pendragon107/day-5-fixing-vlan-bugs-and-adding-a-configuration-file-38gk</guid>
      <description>&lt;p&gt;Hello welcome back to another day. Today I actually ran the code I wrote yesterday and realized there had been some bugs in my earlier implementation for VLAN support so I went back to fix that. &lt;/p&gt;

&lt;p&gt;I also wanted to test out different VLAN configurations on the host but realized my original way of setting up interfaces with a for-loop in main.cpp wasn't going to scale very well so I made a config.txt file that would store all the information and got my Mininet bringup script and main.cpp to both parse information for this file and set up their respective objects with what the config file provides. This also means I can change the VLAN configuration without having to recompile the switch binary like I had to do before. &lt;/p&gt;

&lt;p&gt;I only got 62 lloc written today but tomorrow I plan on writing some proper tests for the features I currently have now that it should be a bit easier to change topology/configurations between runs.&lt;/p&gt;

&lt;p&gt;Thank you for reading, :D.&lt;/p&gt;

</description>
      <category>networking</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 4: Adding VLAN support</title>
      <dc:creator>Grace Mihiral</dc:creator>
      <pubDate>Fri, 06 Nov 2026 05:34:18 +0000</pubDate>
      <link>https://dev.to/pendragon107/day-4-adding-vlan-support-10e7</link>
      <guid>https://dev.to/pendragon107/day-4-adding-vlan-support-10e7</guid>
      <description>&lt;p&gt;Hello, good morning once again (this work session ran a bit late). Today I thought about cleaning up my main.cpp file and splitting it up into two files and then I decided adding VLAN support to the switch would be a lot more fun. &lt;/p&gt;

&lt;p&gt;It started off with modifying the MacTable class to take in a key rather than just a source address (uint8_t) that then needed a function to hash and check for equivalence. After that VLAN tagging checks had to be added to the interface managing class so it could cut out the VLAN tag on arrival and re-add it in when sending it back out. I also added more member variables to keep track of Access/Trunk ports. Then the main processing loop needed to keep track of the VLAN tags that were getting cut out.&lt;br&gt;
I did also add a few lines to my usual test_mininet.py program that starts up mininet with everything setup so that it could also bring up the monitoring interface and clean it up when I exit which I probably should've done earlier.&lt;/p&gt;

&lt;p&gt;I keep forgetting to write down the lloc where I leave off each day but today we got to 830 lloc and had 179 inserted lines. Hopefully tomorrow I'll finally hit the 167 avg lloc I've been aiming for.&lt;/p&gt;

&lt;p&gt;Thanks for reading :D.&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>networking</category>
      <category>programming</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Day 3: Connecting an interface with Wireshark</title>
      <dc:creator>Grace Mihiral</dc:creator>
      <pubDate>Thu, 05 Nov 2026 04:47:41 +0000</pubDate>
      <link>https://dev.to/pendragon107/day-3-connecting-an-interface-with-wireshark-2i57</link>
      <guid>https://dev.to/pendragon107/day-3-connecting-an-interface-with-wireshark-2i57</guid>
      <description>&lt;p&gt;Welcome back to another day where we did not hit 167 lloc but we came close. Regardless of the lines of code today (I did not check what I started at today) I did want to share a pretty cool milestone.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2w6fo8ra054c1p66uzrq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2w6fo8ra054c1p66uzrq.png" alt=" " width="800" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today I worked on getting a monitoring interface to display what my switch was forwarding on Wireshark. I'll go more in depth into it cause I thought it was pretty cool to see everything connect so easily but its almost midnight so another day! &lt;br&gt;
After that though I modified the Monitor class I made to allow for the filtering and sampling of packets so not every forwarded packet needs to wait on an additional syscall to sent the packet out of a second interface. Now that that's working I really should write some testcases but we'll see if that happens. &lt;/p&gt;

&lt;p&gt;Thanks for reading! &amp;gt;:D&lt;/p&gt;

</description>
      <category>networking</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 2</title>
      <dc:creator>Grace Mihiral</dc:creator>
      <pubDate>Tue, 03 Nov 2026 04:35:40 +0000</pubDate>
      <link>https://dev.to/pendragon107/day-2-49bi</link>
      <guid>https://dev.to/pendragon107/day-2-49bi</guid>
      <description>&lt;p&gt;Not all that much got done today either but the current feature I'm working on is a monitoring interface that will allow me to display my logs in an application like Wireshark to have a better idea of what the switch is doing/forwarding for debugging purposes. Adding proper test cases is the next task on the list after this works and then implementing more advanced features to the switch like supporting VLANs. We are currently up 51 lloc from yesterday (yeah thanksgiving break is going to be a bit rough).&lt;/p&gt;

&lt;p&gt;Thanks for reading :D!&lt;/p&gt;

</description>
      <category>networking</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 1 :?</title>
      <dc:creator>Grace Mihiral</dc:creator>
      <pubDate>Mon, 02 Nov 2026 03:30:38 +0000</pubDate>
      <link>https://dev.to/pendragon107/day-1--1p48</link>
      <guid>https://dev.to/pendragon107/day-1--1p48</guid>
      <description>&lt;p&gt;So I've started a 30 day challenge modeled after NanoWriMo where I attempt to write 5000 lloc without ai for one project in the month of November. The lines of code itself doesn't really matter its more about having a scary big number hanging over my head to keep me from wasting my free time. &lt;/p&gt;

&lt;p&gt;Now we need to average 167 lines of code a day to hit the goal which didn't exactly happen today but I feel things will pick up as I get a better handle of what I'm doing. Worst case there's always Thanksgiving Break :/&lt;/p&gt;

&lt;p&gt;So what actually is the project? Now its been a bit since I made some progress on it but I've been working on a userspace switch over the last few months to teach myself more about the linux networking internals. &lt;a href="https://github.com/GraceM599/software-switch" rel="noopener noreferrer"&gt;https://github.com/GraceM599/software-switch&lt;/a&gt;. Don't judge the code quality that's what this month is all about.&lt;br&gt;
Running &lt;code&gt;cloc --exclude-dir=build .&lt;/code&gt; gave me a starting point of 569 lines so by the end of the month the goal is to hit 5569 lines.&lt;/p&gt;

&lt;p&gt;As for what I actually did today. I spent a few minutes figuring out what I had even been doing previously and one of the biggest limitations I identified is that there was no real testing of any features yet (easy free lines) and that the ring buffer IO implementation I did a few weeks ago was getting limited by the way I was polling (a singular while loop) that appeared to be causing bottlenecks when sending large loads of packets between hosts. Or at least that's what I think since there were messages about blocks not being available on host 1 and host 1 was sending packets to host 2 so yknow. So the solution I decided to go for was to give each port its own thread. Except going into threading blind was probably not the best idea so my first few attempts didn't work too well :D.&lt;/p&gt;

&lt;p&gt;What I actually managed to complete today was adding a getter to view the state of the MAC table (for eventual testing) and splitting all the code I had clumped into my header files into having definitions in their respective .cpp files. I also gave each port its own thread which brought the throughput up about 25%. We got about 50 lines in today and the plan for tomorrow is to implement some basic tests then look into modifying the logging to work with Wireshark.&lt;/p&gt;

&lt;p&gt;Anyway, thanks for reading! :&amp;gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>networking</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
