← All procedures

algebra.errnoOf

This function gives the errno of a detection by a timer: the errno of the transition that its event takes from the state. A soft error of the manifestation replaces ETIMEDOUT, but only for the timers whose segments its ICMP quotes in the window.

CLI
Package
@procedures/algebra · README
Path
["algebra","errnoOf"]
CLI
mark algebra errnoOf --doc <object> --state <string> --detector <object> --manifestation <object>
As data
{"$proc":["algebra","errnoOf"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/algebra/register"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["algebra","errnoOf"], { doc: {}, state: "<state>", detector: {}, manifestation: {} });
console.log(JSON.stringify(result));

From the command line

$ mark algebra errnoOf --doc <object> --state <string> --detector <object> --manifestation <object>

As data, in a program

{
  "$proc": ["algebra", "errnoOf"],
  "input": {
    "doc": {},
    "state": "<state>",
    "detector": {},
    "manifestation": {}
  }
}

Input

FieldTypeRequiredDefaultDescription
docobjectyes
statestringyes
detectorobjectyes
manifestationobjectyes

Output

The schema does not list fields (null | string).

JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "doc": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string",
            "const": "mark1russell7.machine/1"
          },
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "layer": {
            "type": "string",
            "enum": [
              "canary",
              "driver",
              "injector",
              "kernel",
              "middlebox",
              "proxy",
              "self",
              "server",
              "wire"
            ]
          },
          "version": {
            "type": "string"
          },
          "conditions": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ref": {
                  "type": "string"
                },
                "rung": {
                  "type": "string",
                  "enum": [
                    "derived",
                    "documented",
                    "implemented",
                    "normative",
                    "observed"
                  ]
                },
                "note": {
                  "type": "string"
                }
              },
              "required": [
                "ref",
                "rung"
              ],
              "additionalProperties": {}
            }
          },
          "states": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "type": "object",
              "properties": {
                "initial": {
                  "type": "boolean"
                },
                "final": {
                  "type": "boolean"
                },
                "pseudo": {
                  "type": "boolean"
                },
                "note": {
                  "type": "string"
                }
              },
              "additionalProperties": {}
            }
          },
          "events": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "app",
                    "local",
                    "packet",
                    "peer",
                    "rx",
                    "timer",
                    "tx"
                  ]
                },
                "note": {
                  "type": "string"
                }
              },
              "required": [
                "kind"
              ],
              "additionalProperties": {}
            }
          },
          "knobs": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                },
                "unit": {
                  "type": [
                    "null",
                    "string"
                  ]
                },
                "default": {
                  "type": [
                    "null",
                    "number"
                  ]
                },
                "off": {
                  "type": "number",
                  "description": "This value turns the knob's timers off: a time that reads the knob at it has no bound."
                },
                "note": {
                  "type": "string"
                }
              },
              "required": [
                "key",
                "scope",
                "unit",
                "default"
              ],
              "additionalProperties": {}
            }
          },
          "timers": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "type": "object",
              "properties": {
                "duration": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "const": {
                          "type": "number"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "const",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "expr": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "expr",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "knob": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "knob",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "type": "string"
                        },
                        "knobs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "model",
                        "knobs",
                        "unit"
                      ],
                      "additionalProperties": {}
                    }
                  ]
                },
                "lateness": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "const": {
                          "type": "number"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "const",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "expr": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "expr",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "knob": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "knob",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "type": "string"
                        },
                        "knobs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "model",
                        "knobs",
                        "unit"
                      ],
                      "additionalProperties": {}
                    }
                  ]
                },
                "early": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "const": {
                          "type": "number"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "const",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "expr": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "expr",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "knob": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "knob",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "type": "string"
                        },
                        "knobs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "model",
                        "knobs",
                        "unit"
                      ],
                      "additionalProperties": {}
                    }
                  ]
                },
                "arms": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "cancels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "fires": {
                  "type": "string"
                },
                "backoff": {
                  "type": "object",
                  "properties": {
                    "resets": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "resets"
                  ],
                  "additionalProperties": {},
                  "description": "A backoff timer starts again after it fires, and no wait is shorter than the wait before it. Examples are the retransmission timer of the kernel, its SYN timer and the reconnect of a driver. Its duration, lateness and early bound are those of one wait. They can read `fired`: the number of times that it fired after the last of its `resets`."
                },
                "note": {
                  "type": "string"
                }
              },
              "required": [
                "duration",
                "arms",
                "fires"
              ],
              "additionalProperties": {}
            }
          },
          "realizes": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "duration": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "const": {
                              "type": "number"
                            },
                            "unit": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "const",
                            "unit"
                          ],
                          "additionalProperties": {}
                        },
                        {
                          "type": "object",
                          "properties": {
                            "expr": {
                              "type": "string"
                            },
                            "unit": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "expr",
                            "unit"
                          ],
                          "additionalProperties": {}
                        },
                        {
                          "type": "object",
                          "properties": {
                            "knob": {
                              "type": "string"
                            },
                            "unit": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "knob",
                            "unit"
                          ],
                          "additionalProperties": {}
                        },
                        {
                          "type": "object",
                          "properties": {
                            "model": {
                              "type": "string"
                            },
                            "knobs": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "unit": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "model",
                            "knobs",
                            "unit"
                          ],
                          "additionalProperties": {}
                        }
                      ]
                    },
                    "lateness": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "const": {
                              "type": "number"
                            },
                            "unit": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "const",
                            "unit"
                          ],
                          "additionalProperties": {}
                        },
                        {
                          "type": "object",
                          "properties": {
                            "expr": {
                              "type": "string"
                            },
                            "unit": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "expr",
                            "unit"
                          ],
                          "additionalProperties": {}
                        },
                        {
                          "type": "object",
                          "properties": {
                            "knob": {
                              "type": "string"
                            },
                            "unit": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "knob",
                            "unit"
                          ],
                          "additionalProperties": {}
                        },
                        {
                          "type": "object",
                          "properties": {
                            "model": {
                              "type": "string"
                            },
                            "knobs": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "unit": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "model",
                            "knobs",
                            "unit"
                          ],
                          "additionalProperties": {}
                        }
                      ]
                    },
                    "early": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "const": {
                              "type": "number"
                            },
                            "unit": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "const",
                            "unit"
                          ],
                          "additionalProperties": {}
                        },
                        {
                          "type": "object",
                          "properties": {
                            "expr": {
                              "type": "string"
                            },
                            "unit": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "expr",
                            "unit"
                          ],
                          "additionalProperties": {}
                        },
                        {
                          "type": "object",
                          "properties": {
                            "knob": {
                              "type": "string"
                            },
                            "unit": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "knob",
                            "unit"
                          ],
                          "additionalProperties": {}
                        },
                        {
                          "type": "object",
                          "properties": {
                            "model": {
                              "type": "string"
                            },
                            "knobs": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "unit": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "model",
                            "knobs",
                            "unit"
                          ],
                          "additionalProperties": {}
                        }
                      ]
                    },
                    "note": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "duration"
                  ],
                  "additionalProperties": {}
                },
                {
                  "type": "object",
                  "properties": {
                    "timer": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "timer"
                  ],
                  "additionalProperties": {}
                }
              ]
            },
            "description": "These are the mechanisms whose time this machine gives, by the identifier of each mechanism."
          },
          "over": {
            "type": "object",
            "properties": {
              "machine": {
                "type": "string",
                "description": "This identifier is the machine below, as a graph identifies its document."
              },
              "states": {
                "type": "object",
                "properties": {},
                "additionalProperties": {
                  "type": "string"
                },
                "description": "This map gives the state of the lower machine that each state of this machine is on."
              },
              "sets": {
                "type": "object",
                "properties": {},
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "const": {
                          "type": "number"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "const",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "expr": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "expr",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "knob": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "knob",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "type": "string"
                        },
                        "knobs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "model",
                        "knobs",
                        "unit"
                      ],
                      "additionalProperties": {}
                    }
                  ]
                },
                "description": "These are the knobs of the lower machine that this machine sets, by their lower names, over its own knobs."
              },
              "ends": {
                "type": "string",
                "description": "This event is the event of this machine that the end of the lower machine arrives as."
              },
              "note": {
                "type": "string"
              }
            },
            "required": [
              "machine",
              "states",
              "sets",
              "ends"
            ],
            "additionalProperties": {},
            "description": "This is the machine that this machine operates on, for a machine on another machine."
          },
          "transitions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "from": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  ]
                },
                "to": {
                  "type": "string"
                },
                "on": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  ]
                },
                "guard": {
                  "type": "string"
                },
                "timer": {
                  "type": "string"
                },
                "emits": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "errno": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                },
                "source": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "from",
                "to",
                "on"
              ],
              "additionalProperties": {}
            }
          },
          "observe": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "type": "object",
              "properties": {
                "states": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": {
                    "type": "string"
                  }
                },
                "hides": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "fidelity": {
                  "type": "string",
                  "enum": [
                    "complete",
                    "derived",
                    "lossy",
                    "sampled"
                  ]
                },
                "note": {
                  "type": "string"
                }
              },
              "required": [
                "states",
                "fidelity"
              ],
              "additionalProperties": {}
            }
          },
          "generated": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string"
              },
              "by": {
                "type": "string"
              }
            },
            "required": [
              "from",
              "by"
            ],
            "additionalProperties": {}
          }
        },
        "required": [
          "format",
          "id",
          "title",
          "layer",
          "version",
          "sources",
          "states",
          "events",
          "knobs",
          "timers",
          "transitions"
        ],
        "additionalProperties": {}
      },
      "state": {
        "type": "string"
      },
      "detector": {
        "type": "object",
        "properties": {
          "timer": {
            "type": "string"
          },
          "fires": {
            "type": "string"
          }
        },
        "required": [
          "timer",
          "fires"
        ],
        "additionalProperties": {}
      },
      "manifestation": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "passes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "delivers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "These are the events that the failure itself sends one time, for example the FIN of a process that stopped with SIGKILL. A delivered event that a transition takes from the state of the connection detects the failure at once."
          },
          "errno": {
            "type": "object",
            "properties": {
              "errno": {
                "type": "string"
              },
              "timers": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "errno",
              "timers"
            ],
            "additionalProperties": {},
            "description": "This errno replaces ETIMEDOUT when one of these timers gives up. Linux keeps an ICMP error on an established socket as a soft error, and the timeout reports it (`tcp_write_err`). An ICMP counts only when it quotes a segment in the window (`tcp_v4_err`). A retransmission is in the window. A keepalive probe uses the sequence number before `snd_una`, thus its ICMP does not count."
          },
          "replaces": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "type": "object",
              "properties": {
                "duration": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "const": {
                          "type": "number"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "const",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "expr": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "expr",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "knob": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "knob",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "type": "string"
                        },
                        "knobs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "model",
                        "knobs",
                        "unit"
                      ],
                      "additionalProperties": {}
                    }
                  ]
                },
                "lateness": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "const": {
                          "type": "number"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "const",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "expr": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "expr",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "knob": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "knob",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "type": "string"
                        },
                        "knobs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "model",
                        "knobs",
                        "unit"
                      ],
                      "additionalProperties": {}
                    }
                  ]
                },
                "early": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "const": {
                          "type": "number"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "const",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "expr": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "expr",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "knob": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "knob",
                        "unit"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "type": "string"
                        },
                        "knobs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "unit": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "model",
                        "knobs",
                        "unit"
                      ],
                      "additionalProperties": {}
                    }
                  ]
                }
              },
              "additionalProperties": {}
            },
            "description": "These are the durations that the failure changes, by timer. For example, an ICMP host unreachable for each retransmission reverts the backoff of the retransmission timer."
          }
        },
        "required": [
          "name",
          "passes"
        ],
        "additionalProperties": {}
      }
    },
    "required": [
      "doc",
      "state",
      "detector",
      "manifestation"
    ],
    "additionalProperties": false
  },
  "output": {
    "type": [
      "null",
      "string"
    ]
  }
}