oshogbo web http://www.oshogbo.vexillium.org oshogbo - My place in space Introduction to nvlist part 3 - simple traversing Nvlist allows us to keep pairs (name, value). The question for today is what if the name of an element is unknown? Or what if there is a need to traverse over all elements on a list? First of all there is the nvlist_next() function. This function allows to iterate over one single list. The return value is the name of the next element on the list or NULL if the list is ends. The additional information which is returned by this function is the type of the element. Thanks to these two values (the name of the element and it’s type) we can decide which function to use. The last element is secret cookie which refers to the position where we are on the list. At the beginning the cookie needs to be initialized by NULL otherwise the program will behave abnormally. http://www.oshogbo.vexillium.org/blog/45/ 45 Oct. 31, 2017, 11:17 p.m. Introduction to nvlist part 2 - dnvlist One of the assumptions of nvlist is that during fetch functions (like get or take) an application knows what elements are on the list, otherwise read operations fail and the application will be aborted. If an element is optional then it is necessary to check if the element exists using the exist functions. http://www.oshogbo.vexillium.org/blog/43/ 43 Oct. 24, 2017, 7:16 p.m. Introduction to nvlist part 1 Nvlist is an implementation of a general purpose container based on a list which contains pairs (name, value). The idea behind this library is borrowed from the Solaris library which has the same name. In Solaris nvlist is used for example, by the ZFS. In FreeBSD nvlist exists in kernel and userland. Nvlist was implemented to provide an easy inter-process communication framework for applications that will be privileged separated and later sandboxed, due to this in userland there are functions allowing us to send nvlist over the Unix domain socket, in that case there is also a possibility to send descriptors with nvlist. http://www.oshogbo.vexillium.org/blog/42/ 42 Oct. 17, 2017, 11:13 p.m. Magical initialization in for loop Recently one of my friends had a strange problem - he wanted to initialize a few variables with a different type in a single for loop. What was even more strange was that he wanted to declare just one of them and both of them have different type. A declaration of variables is forbidden in the loop for C standard which are older than C99, so let’s assume we are using exactly that standard. One of the questions could be “why is your friend so crazy that he would want to do that” - basically he wanted to create a macro which would declare for him a head of the loop very similar to what STAILQ_FOREACH. http://www.oshogbo.vexillium.org/blog/41/ 41 Nov. 30, 2016, 5:45 p.m. A fairy tale about solving security problems I had the pleasure of giving talks at two great BSD conferences - BSDCan and AsiaBSDcon. The first one was held in June at the University of Ottawa, Canada and the second one was in March at the Tokyo University of Science, Japan. http://www.oshogbo.vexillium.org/blog/40/ 40 Sept. 30, 2016, 10:09 p.m. Bhyve NFS boot bhyve is a hypervisor for FreeBSD. A few weeks ago I gave it a try and I must admit I was very impressed, so much that I decided to write a short tutorial on how to configure bhyve to boot from NFS filesystem. So lets start. http://www.oshogbo.vexillium.org/blog/39/ 39 Nov. 22, 2015, 10:09 p.m. BSDCam 2015 Trip Report I'm a fresh FreeBSD committer who is very interested in security things. I also work for the Wheel Systems company which develops security solutions. So it was natural for me that I should attend Cambridge Developer Summit which, in my opinion, is the most security related event in every committer’s calendar. This was also my third visit to Cambridge. For the first one I also wrote a trip report which you can find here. The conference was held in August 17-20, 2015. http://www.oshogbo.vexillium.org/blog/38/ 38 Oct. 20, 2015, 11:02 p.m. [PL] Compo IGK'2014 To już ponad miesiąc po IGK'2014. Czas ożywić bloga krótką relacją z tego wydarzenia. Jak co roku w Siedlcach w Instytucie Informatyki na Wydziale Nauk Ścisłych Uniwersytetu Przyrodniczo-Humanistycznego odbyła się konferencja poświęconej "inżynierii gier komputerowych". Miałem okazję być na tej konferencji już po raz siódmy. http://www.oshogbo.vexillium.org/blog/37/ 37 June 1, 2014, 2:27 a.m. Presentations Today I would like to share with you some of the presentations which I made in last couple of months. Some of them are only available in Polish other in English. I hope everybody will find something for himself. All presentations was made at Warsaw University of Technology but all of them on different occasions. http://www.oshogbo.vexillium.org/blog/36/ 36 March 11, 2014, 12:50 p.m. FreeBSD DevSummit 2013 Some time ago I post my trip report to the Freebsd Foundation, now its time to post it here. Orginal post you can find&nbsp;<a style="font-family: 'Open Sans', Helvetica, Segoe, sans-serif; font-size: 16px; font-style: normal;" href="http://freebsdfoundation.blogspot.com/2013/09/cambridge-devsummit-trip-report-mariusz.html">here</a>. I was invited to the Cambridge DevSummit. Cambridge University is closely related to my&nbsp;<a style="font-family: 'Open Sans', Helvetica, Segoe, sans-serif; font-size: 16px; font-style: normal;" href="https://wiki.freebsd.org/SummerOfCode2013/CapsicumFeatures">GSoC project</a>&nbsp;because this is the place where Capsicum was born and the initial implementation created by Robert Watson and his team. http://www.oshogbo.vexillium.org/blog/33/ 33 Oct. 8, 2013, 2 a.m. FreeBSD diskless on VirtualBox Firstly what is FreeBSD diskless? FreeBSD diskless is an operating system that will boot on your computer (or virtual machine) over the network. There are many situations in which you probably want to use such a configuration. For example if you are a computer science teacher you could configure one system in your class and make other computers use it over the network. In another situation you could need some laboratory to play a little with the FreeBSD kernel.This configuration has a lot of benefits. For example you don't have to restart your developer machine every time you compile the kernel or worry that you broke your kernel and you will not have a developer machine any more. If you know me a little you probably know that I'm not a computer science teacher. http://www.oshogbo.vexillium.org/blog/28/ 28 Sept. 23, 2013, 2 a.m. [PL] IGK 2013 Compo - o naszej grze <p><strong style="font-family: 'Open Sans', Helvetica, Segoe, sans-serif; font-size: 16px; font-style: normal;">(collaborative post by&nbsp;<a style="font-size: 16px;" href="http://gynvael.coldwind.pl/?id=504">Gynvael</a>, oshogbo &amp; xa)</strong><br /> W Siedlcach odbyła się co roczna konferencja Inżynierii Gier Komputerowych (IGK) - tym razem była to jubileuszowa, 10siąta, edycja. I jak co roku było teamowe compo - 6.5h (ostatecznie przedłużone o jeszcze godzinę) na zrobienie gry na zadany temat w maksymalnie 4 osoby. Tematem było "Artillery Game" (więcej poniżej), a alians Vexillium + Dragon Sector (reprezentowany przez 6 os&oacute;b na IGK) wystawił dwa teamy po 3 osoby (pod nazwami "Bad Sectors" oraz "Dragons"). Ostatecznie obu naszym teamom udało się stworzyć w pełni działające i ukoączone gry (bugi przemilczmy ;p), i zając&nbsp;<strong style="font-family: 'Open Sans', Helvetica, Segoe, sans-serif; font-size: 16px; font-style: normal;">pierwsze</strong>&nbsp;oraz&nbsp;<strong style="font-family: 'Open Sans', Helvetica, Segoe, sans-serif; font-size: 16px; font-style: normal;">piąte</strong>&nbsp;miejsce na 12 drużyn. W niniejszym poście chcieliśmy coś napisać o grze naszego teamu z pierwszego miejsca (w składzie: code: gynvael+oshogbo, gfx: xa), a także udostępnić grę w wersji post-compo (razem ze źr&oacute;dłami na MIT i grafiką na CC) oraz port gry na HTML5 kt&oacute;ry zrobił Xa w ciągu ostatnich paru wieczor&oacute;w. Miłej lektury (tak, są obrazki) :)</p> http://www.oshogbo.vexillium.org/blog/17/ 17 May 5, 2013, 2 a.m. Hello in the new year! It's publishing Time! I haven't forgotten about this place, but also I didn't think that writing technical post would be so hard in English. I hope I get some practice and will become much better. Today is the perfect day to write a new blog post. http://www.oshogbo.vexillium.org/blog/16/ 16 Jan. 6, 2012, 1:29 p.m. Android graphics alternative The standard method of using graphics is to use Canvas and Drawable and other funny things that I don't like (you can read about it at&nbsp;<a style="font-size: 16px;" href="http://developer.android.com/guide/topics/graphics/2d-graphics.html">http://developer.android.com/guide/topics/graphics/2d-graphics.html</a>).<br />The other way to read graphics in android is using "assets". What is it? http://www.oshogbo.vexillium.org/blog/15/ 15 Dec. 10, 2011, 10:46 a.m. [PL] How play Mario? http://www.oshogbo.vexillium.org/blog/11/ 11 Nov. 7, 2009, 1 a.m.