We propose a general formalism to characterize orientational frustration of smectic liquid crystals in confinement by interpreting the emerging networks of grain boundaries as objects with a topological charge. In a formal idealization, this charge is distributed in pointlike units of quarter-integer magnitude, which we identify with tetratic disclinations located at the end points and nodes. This coexisting nematic and tetratic order is analyzed with the help of extensive Monte Carlo simulations for a broad range of two-dimensional confining geometries as well as colloidal experiments, showing how the observed defect networks can be universally reconstructed from simple building blocks. We further find that the curvature of the confining wall determines the anchoring behavior of grain boundaries, such that the number of nodes in the emerging networks and the location of their end points can be tuned by changing the number and smoothness of corners, respectively.