code: func (d *driver) Join(nid, eid string, sboxKey string, jinfo driverapi.JoinInfo, options map[string]interface{}) error {
  	if err := validateID(nid, eid); err != nil {
  		return err
  	}
  
  	n := d.network(nid)
  	if n == nil {
  		return fmt.Errorf("could not find network with id %s", nid)
  	}
  
  	ep := n.endpoint(eid)
  	if ep == nil {
  		return fmt.Errorf("could not find endpoint with id %s", eid)
  	}
  
  	buf, err := proto.Marshal(&PeerRecord{
  		EndpointIP:       ep.addr.String(),
  		EndpointMAC:      ep.mac.String(),
  		TunnelEndpointIP: n.providerAddress,
  	})
  
  	if err != nil {
  		return err
  	}
  
  	if err := jinfo.AddTableEntry(ovPeerTable, eid, buf); err != nil {
  		logrus.Errorf("overlay: Failed adding table entry to joininfo: %v", err)
  	}
  
  	if ep.disablegateway {
  		jinfo.DisableGatewayService()
  	}
  
  	return nil
  }
docs: // Join method is invoked when a Sandbox is attached to an endpoint.