• Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Welcome to OpenComputers

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more!

This message will be removed once you have signed in.

  • Announcements

    • Lizzy Trickster

      Latest Stable OpenComputers Version   11/26/16

      The latest released version of OpenComputers is version 1.6.1 for MC 1.7.10, 1.8.9, 1.9.4 & 1.10.2. See more information here! Beta/Dev builds can be found at the Jenkins Build Server (ci.cil.li)

Magik6k

Members
  • Content count

    32
  • Joined

  • Last visited

  • Days Won

    15

About Magik6k

  • Rank
    Junior Member

Contact Methods

  • Minecraft
    magik6000
  • GitHub
    magik6k

Recent Profile Visitors

401 profile views
  1. THIS IS SO COOL I really do wonder how well it would work with Plan9k as it has (IMO) better threading support, proper virtual component support and component/event sandboxing/namespaces (so a program can/can't see selected components, events can be filtered/translated(like mouse clicks)). Would you mind if I try to port this api there? Oh, and why won't you put this on OpenPrograms/OPPM?
  2. Why MsgPack instead of CBOR(RFC 7049)?
  3. OETF #10 - OHCP - simple DHCP/BOOTP like protocol for host auto configuration. 1. Protocol This is specification for a binary data frame(a Lua string), sent over OETF #7 protocol with protocol number 0xCF. BYTE 0 | BYTE 1 | DATA | BROADCAST --------------------|--------------------------|----------------------------|----------- 0x00 - ADDR REQUEST | NOT SET | NOT SET | ALLOWED 0x01 - CLIENT RESP | 0x00 IPv4 address assign | IPv4+subnet byte (4b + 1b) | NO 0x01 - CLIENT RESP | 0x02 IPv4 gateway | Gateway IPv4 (4b) | NO 2. Protocol Flow When a new client is starting up, it SHOULD broadcast `ADDR REQUEST` once. In case of no response it may retry after at least 15 seconds. If server has free addresses in address pools it should respond with `CLIENT RESP` packets, setting the client up.
  4. This is a repost, as the old post was removed for some reason.. Requirements OpenOS Lua 5.2 CPU T3 hard drive Internet Card Installation 1. Install MPT wget http://mpt.magik6k.net/api/file/mpt/usr/bin/mpt.lua /tmp/mpt.lua /tmp/mpt -S mpt rm /tmp/mpt.lua 2. Install craftos mpt -S cc-installer craftos install 3. Enjoy craftos Issues If something doesn't work/show up(like a peripheral), post about it here.
  5. 1. Purpose OETF #9 - OC Host Discovery Protocol is a host discovery protocol for local OC networks specified by OETF #7. 2.Protocol This is specification for a binary data frame(a Lua string), sent over OETF #7 protocol with protocol number 0x0C. All frames are allowed to be sent as a broadcast or as a direct message. Prefix byte | Action | Payload ------------|-------------------------------------|----------- 0x01 | Peer IPv4 Advertisement | 4 byte IPv4 0x02 | IPv4 Discovery request | Optional 4 byte IPv4 [reserved] | | 0x08 | Peer IPv6 Advertisement | 16 byte IPv6 0x09 | IPv6 Discovery request | Optional 16 byte IPv6 When a peer in a network receives a 'Discovery request', it MUST respond with a 'Peer Advertisement' massages with all addresses set on a given interface. When a peer is assigned an address is SHOULD broadcast a 'Peer Advertisement' message. Some implementations may choose to broadcast those is some set periods, if they choose to do so, it's recommended to set the interval to at least 60 seconds to not stress the network. Responses to 'Discovery request' frames SHOULD NOT be a broadcast messages. When there is no payload in 'Discovery request' frame, all addresses set on a given interface should be advertised. Implementations MAY choose to not implement filtering in 'Discovery request' frames, falling back to the no-payload behavior.
  6. Port 1 is just a default that can be changed. Ports in this network stack are used as VLANs, If in your infrastructure something else is using that port, you are free to change it, and it's not that hard(that is, implementations shouldn't make it hard).
  7. I see no need for goto there: local function timer() local seconds = 0 while true do if reactor.getActive() then seconds = seconds + 1 end center(2, "Time Running: "..math.floor(seconds / 60)..":"..(seconds % 60)) sleep(1) end end
  8. Use ``` for line in io.lines("/home/file.txt") do --line is a string end ```
  9. Also, it would be fancy if one could use big battery as power buffer, as internal 10MRF is way too small for 1MRF/t+ reactor.
  10. You can use braille Unicode characters to give the bars more resolution as with OC font they are exactly 1/4 vert and 1/2 horiz of a full character block(the characters are "⣀", "⣤", "⣶", "⣿", "⡇")
  11. The following document is still a DRAFT and a subject to change, though protocol and assigned numbers should not change. 1. Purpose ON2 - OCNet L2 protocol - is a very simple standard is aimed at advanced network stacks. It provides protocol tagging and optional vlan separation for devices that support it. 2. Protocol ON2 utilizes the fact that OpenComputers network message can have multiple parameters. When a message(data frame) is sent using ON2 layer, the implementation sets first data parameter to protocol number and passes the data via second data argument. Port number(if supported by device) can be used as VLAN tag allowing network separation. Default port number(vlan) is 1 Here is an example modem call for sending data frame with protocol 0x46 (IP frame): component.invoke(modem, "send", dest, vlan, 0x46, ip_data) 3. Implementation recommendations Each network stack implementation should default to listening and sending on port 1. If packet of with unknown protocol number is received is should be silently dropped. Implementations should pass local/remote address and interface information(modem ID, vlan or interface object) to higher layers. 4. Protocol numbers: Protocols are identified by numbers assigned in table below. |-------------------------------------------------------------| | PROTOCOL NUMBER | PROTOCOL NAME | DEFINING STANDARD | |-----------------X--------------------X----------------------| | 0x0C | OC HOST DISCOVERY | OETF #9 | |-----------------X--------------------X----------------------| | 0x46 | IPv4 or IPv6 Frame | RFC791 and RFC2460 | |-----------------X--------------------X----------------------| | 0xCF | OHCP CONFIG PROTO | OETF #10 | |-----------------X--------------------X----------------------| | 0x1000 | MultICE | ??? | |-----------------X--------------------X----------------------| | Above 0xFFFF | User defined | N/A | |-------------------------------------------------------------| You can apply for assigning protocol number by a post in this thread.
  12. If you're that worried about people you lot on your server there is the whitelist option in internet section of the settings.json, where you explicitly say what's allowed.
  13. I was away from OC for pretty long now, and I haven't got time to play with it/fix existing errors. There is new version of mpt waiting in PR(https://github.com/MightyPirates/OpenComputers/pull/2094) which fixes mentioned bug. ssh and other network related programs are huge mess as of now because I'm in progress of rewriting network stack to real ipv4/v6(I have ipv4, udp, basic icmp, RIPv2 protocols implemented as of now, and ~30% of TCP implementation). Most network programs still need to be adjusted for this API(It's not hard, just needs to be done). I consider moving big chunk of Plan9k to GitHub(OPPM) to make contributions easier.
  14. You probably just want to use io.stderr:write() for that
  15. This seems doable in Plan9k with its multi-threading, you basically do `local pid = os.spawn(threadFunc)` and then optionally `require("pipes").joinThread(pid)` to wait for spawned thread(s).