Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LinkDriver interface and Driver package #221

Merged
merged 5 commits into from
May 10, 2024

Commits on May 9, 2024

  1. Add attr validation

    This commit removes unix.IFLA_UNSPEC and introduces checks for the interface name,
    the link type and the queue disc fields.
    Interface name validation is necessary to prevent an 'invalid argument' error
    when creating a link with an empty name. Other checks were added to be consistent with the ip tools.
    
    Signed-off-by: Birol Bilgin <birolbilgin@gmail.com>
    brlbil committed May 9, 2024
    Configuration menu
    Copy the full SHA
    8a1ad3d View commit details
    Browse the repository at this point in the history
  2. Add network namespace type

    This commit introduces the NetNS struct and integrates network namespace capabilities into link attributes.
    This enhancement facilitates the creation of links, such as veth pairs, across different network namespaces
    without the need to execute directly within those namespaces.
    
    Signed-off-by: Birol Bilgin <birolbilgin@gmail.com>
    brlbil committed May 9, 2024
    Configuration menu
    Copy the full SHA
    04ec93c View commit details
    Browse the repository at this point in the history
  3. Add LinkDriver interface

    This commit introduces a Driver interface and changes Data and SlaveData fields within the LinkInfo struct
    as LinkDriver to accommodate driver-specific data encoding, addressing the limitation
    where LinkInfo.Data and SlaveData fields were merely byte slices without support for specific data encoding.
    
    Drivers are registered globally with the RegisterDriver function.
    For un-registered drivers, the default LinkData driver is used.
    
    Signed-off-by: Birol Bilgin <birolbilgin@gmail.com>
    brlbil committed May 9, 2024
    Configuration menu
    Copy the full SHA
    bf33aae View commit details
    Browse the repository at this point in the history
  4. Add Driver Package

    This commit introduces the 'driver' package, which contains specific implementations of the LinkDriver interface.
    It also includes the implementation of the Linux bond driver as LinkDriver and the bond slave driver as LinkSlaveDriver.
    
    Signed-off-by: Birol Bilgin <birolbilgin@gmail.com>
    brlbil committed May 9, 2024
    Configuration menu
    Copy the full SHA
    5687cef View commit details
    Browse the repository at this point in the history
  5. Add Netkit and Veth drivers

    This commit adds Netkit and Veth drivers.
    
    Signed-off-by: Birol Bilgin <birolbilgin@gmail.com>
    brlbil committed May 9, 2024
    Configuration menu
    Copy the full SHA
    22f75eb View commit details
    Browse the repository at this point in the history